Makefile 2.05 KB
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
# this is <Makefile>
# ----------------------------------------------------------------------------
thomas.forbriger's avatar
thomas.forbriger committed
3
# $Id: Makefile,v 1.7 2007-07-05 16:08:22 tforb Exp $
thomas.forbriger's avatar
thomas.forbriger committed
4
5
6
7
# 
# Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt) 
# 
# SFF header manipulation
thomas.forbriger's avatar
thomas.forbriger committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
# ----
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. 
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
# ----
thomas.forbriger's avatar
thomas.forbriger committed
24
25
26
27
28
# 
# REVISIONS and CHANGES 
#    14/03/2002   V1.0   Thomas Forbriger
# 
# ============================================================================
thomas.forbriger's avatar
thomas.forbriger committed
29
#
thomas.forbriger's avatar
thomas.forbriger committed
30
31
32

all:

33
flist: Makefile $(wildcard *.f *.cc)
thomas.forbriger's avatar
thomas.forbriger committed
34
35
36
37
38
39
40
41
42
	echo $^ | tr ' ' '\n' | sort > $@

.PHONY: edit
edit: flist; vim $<

.PHONY: clean
clean: ; 
	-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
	-/bin/rm -vf flist *.o
thomas.forbriger's avatar
thomas.forbriger committed
43
44
45

F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
PGPLOTLIB=-lf2cpgplot52 -lX11 -L/usr/X11/lib
46
LIBSFF=-lsff -L$(SERVERLIBDIR)
thomas.forbriger's avatar
thomas.forbriger committed
47
48
49
50
LIBTF=-ltf -L$(LOCLIBDIR)
CC=gcc
CFLAGS=-O2
F2CFLAGS=-f -u
51
52
53
54
CXXFLAGS=-Wall $(FLAGS)
LDFLAGS=-L$(LOCLIBDIR)
CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS)

thomas.forbriger's avatar
thomas.forbriger committed
55
56
57
58
59
60

.f.o:
	f2c $(F2CFLAGS) $<
	gcc $(CFLAGS) $(<:.f=.c) -c -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
	@rm  $(<:.f=.c)

thomas.forbriger's avatar
thomas.forbriger committed
61
sehefi coma epi chaco sesoc: %: %.o
62
63
64
	$(CC) -o $@ $< $(LIBTF) $(LIBSFF) $(F2CLIB)
	newprog $@

65
66
offli sesot merse: %: %.o
	$(CC) -o $@ $< $(LIBTF) -lsffu -ltime_trad $(LIBSFF) $(F2CLIB)
thomas.forbriger's avatar
thomas.forbriger committed
67
	newprog $@
thomas.forbriger's avatar
thomas.forbriger committed
68

69
70
71
72
73
cooset: %: %.o
	$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lsffxx -ltime++ -lgsexx -laff \
                  -ltfxx -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
	newprog $@

thomas.forbriger's avatar
thomas.forbriger committed
74
# ----- END OF Makefile -----