Commit a0d718e8 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: 3387
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 5bfe6450
......@@ -12,7 +12,21 @@
# ============================================================================
#
all:
all: sousou
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_BROWSER TF_WWWBASEDIR)
LINLIB=-llapack -lblas
CC=gcc
CFLAGS=-O2 -I${LOCINCLUDEDIR}
LIBS=-lsffu -ltime
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
#----------------------------------------------------------------------
flist: Makefile $(wildcard *.f *.inc)
echo $^ | tr ' ' '\n' | sort > $@
......@@ -23,46 +37,31 @@ edit: flist; vim $<
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist *.o
-/bin/rm -vf flist *.o *.d *.doc
LINLIB=-llapex -lblasex
# LINLIB=-lf2cimslmath
BUGGY=
F2CLIB=-lf2c -lm -L${SERVERLIBDIR}
F2CFLAGS=-f -u
PGPLOTLIB=-lf2cpgplot52 -lX11 -L/usr/X11/lib
CC=gcc
CFLAGS=-O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
LIBSFF=-lsff -L$(SERVERLIBDIR)
LIBS=-lsffu -ltime
GFLAG=
#----------------------------------------------------------------------
OBS=sousou.o sousou_readdata.o sousou_skipdata.o sousou_checks.o \
sousou_prepare.o sousou_writedata.o sousou_analysis.o sousou_writeslow.o
include make.incdep
make.incdep: *.f
incdep > make.incdep
%.d: %.f
echo $<: $(shell cat $< | egrep '^ +include' | cut -f 2 -d \' | sort | uniq) > $@
-include $(patsubst %.o,%.d,$(OBS))
%.doc: %.f
extractdoc.tcl $< > $(<:.f=.doc)
.f.o:
f2c $(F2CFLAGS) $<
$(CC) $(CFLAGS) $(GFLAG) $(<:.f=.c) -c
@rm $(<:.f=.c)
sousou.doc: $(patsubst %.o,%.f,$(OBS))
/usr/bin/awk 'BEGIN{ hot=0; } \
/^cS/ { hot=1; \
print FILENAME; \
print " c\n c"; \
next; } \
/^cE/ { hot=0; } \
{ if (hot==1) { print " " $$0; } }' $^ > $@
sousou: $(OBS)
$(CC) -o $(LOCBINDIR)/$@ $(OBS) \
-ltf -lts $(LIBS) $(LIBSFF) \
$(PGPLOTLIB) $(LINLIB) \
-L$(LOCLIBDIR) $(F2CLIB)
docs: $(DOCS)
dep:
incdep > make.incdep
$(FC) -o $(LOCBINDIR)/$@ $(OBS) \
-ltf -lts $(LIBS) -lsff \
$(TF_LINK_PGPLOT) $(LINLIB) \
-L$(LOCLIBDIR)
# ----- 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