Commit 5bfe6450 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

reworked makefile

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3386
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent c1694f4f
......@@ -8,43 +8,64 @@
#
# REVISIONS and CHANGES
# 08/04/2009 V1.0 Thomas Forbriger
# 15/11/2010 V1.1 reworked makefile; avoid makedoc.tcl and incdep
#
# ============================================================================
#
all: fidase
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
#LINLIB=-llapex -lblasex
LINLIB=-lblas -llapack
# LINLIB=-lf2cimslmath
BUGGY=
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u
PGPLOTLIB=-l$(TF_g77_PGPLOT) $(TF_LINK_PGPLOT)
CC=gcc
CFLAGS=-I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
LIBSFF=-lf2cstuff -L$(SERVERLIBDIR)
PGPLOTLIB=$(TF_LINK_PGPLOT)
CFLAGS= -I${LOCINCLUDEDIR}
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
GFLAG=
#----------------------------------------------------------------------
.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 $<
clean:
-/bin/rm *.o *.bak *.d
#----------------------------------------------------------------------
FIDAOBS=fidase.o fidase_readdata.o fidase_skipdata.o fidase_writedata.o \
fidase_readtaper.o fidase_evaltaper.o fidase_enfit.o fidase_resamp.o \
fidase_destack.o
-include make.incdep
#----------------------------------------------------------------------
%.doc: %.f
extractdoc.tcl $< > $(<:.f=.doc)
%.d: %.f
echo $<: $(shell cat $< | egrep '^ +include' | cut -f 2 -d \' | sort | uniq) > $@
-include $(patsubst %.o,%.d,$(FIDAOBS))
#----------------------------------------------------------------------
%.o: %.f
$(FC) -o $@ -c $< $(FFLAGS)
fidase.doc: $(patsubst %.o,%.f,$(FIDAOBS))
/usr/bin/awk 'BEGIN{ hot=0; } \
/^cS/ { hot=1; \
print FILENAME; \
print " c\n c"; \
next; } \
/^cE/ { hot=0; } \
{ if (hot==1) { print " " $$0; } }' $^ > $@
%.f2c.o: %.f
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(GFLAG) $(<:.f=.c) -c
@rm $(<:.f=.c)
#----------------------------------------------------------------------
clean:
-/bin/rm *.o *.bak
%.o: %.f
$(FC) -o $@ -c $< $(FFLAGS)
fidase: $(FIDAOBS)
$(FC) -o fidase $(FIDAOBS) \
......@@ -53,18 +74,4 @@ fidase: $(FIDAOBS)
-L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
docs: $(DOCS)
make.incdep: *.f
incdep > make.incdep
.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 $<
# ----- END OF Makefile -----
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment