Makefile 1.59 KB
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
3
4
5
6
7
8
9
10
11
12
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.5 2009-04-08 07:44:36 tforb Exp $
# 
# Copyright (c) 2009 by Thomas Forbriger (BFO Schiltach) 
# 
# fidase: prepare a homogeneous data set from individual shot files
# 
# REVISIONS and CHANGES 
#    08/04/2009   V1.0   Thomas Forbriger
# 
# ============================================================================
13
14
#

thomas.forbriger's avatar
thomas.forbriger committed
15
16
#LINLIB=-llapex -lblasex
LINLIB=-lblas -llapack
17
18
19
20
# LINLIB=-lf2cimslmath
BUGGY=
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u
thomas.forbriger's avatar
thomas.forbriger committed
21
PGPLOTLIB=-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT)
22
CC=gcc
thomas.forbriger's avatar
thomas.forbriger committed
23
CFLAGS=-I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} 
24
LIBSFF=-lf2cstuff -L$(SERVERLIBDIR)
thomas.forbriger's avatar
thomas.forbriger committed
25
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
26
27
28
GFLAG=

FIDAOBS=fidase.o fidase_readdata.o fidase_skipdata.o fidase_writedata.o \
thomas.forbriger's avatar
thomas.forbriger committed
29
30
  fidase_readtaper.o fidase_evaltaper.o fidase_enfit.o fidase_resamp.o \
  fidase_destack.o
31

32
-include make.incdep
33
34
35
36

%.doc: %.f
	extractdoc.tcl $< > $(<:.f=.doc)

thomas.forbriger's avatar
thomas.forbriger committed
37
38
39
40
41

%.o: %.f
	$(FC) -o $@ -c $< $(FFLAGS)

%.f2c.o: %.f
42
43
44
45
46
47
48
49
	f2c $(F2CFLAGS) $<
	$(CC) $(CFLAGS) $(GFLAG) $(<:.f=.c) -c 
	@rm  $(<:.f=.c)

clean:
	-/bin/rm *.o *.bak

fidase: $(FIDAOBS)
thomas.forbriger's avatar
thomas.forbriger committed
50
	$(FC) -o fidase $(FIDAOBS) \
51
        -ltf -lts -lsffu -ltime_trad -lsff \
52
        $(PGPLOTLIB) $(LINLIB) \
thomas.forbriger's avatar
thomas.forbriger committed
53
54
        -L$(LOCLIBDIR) 
	/bin/mv -fv $@ $(LOCBINDIR)
55
56
57
58
59
60

docs: $(DOCS)

make.incdep: *.f
	incdep > make.incdep

thomas.forbriger's avatar
thomas.forbriger committed
61
62
63
64
65
66
67
68
.PHONY: clean edit

flist: Makefile $(FIDAOBS:.o=.f) *.inc
	echo $< > $@
	echo $(FIDAOBS:.o=.f) | tr ' ' '\n' | sort >> $@
	echo *.inc | tr ' ' '\n' | sort >> $@

edit: flist; vim $<
thomas.forbriger's avatar
thomas.forbriger committed
69
70

# ----- END OF Makefile -----