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

handle colon separated lists in SERVERLIBDIR and SERVERINCLUDEDIR

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: 3757
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 8185ad07
......@@ -41,14 +41,6 @@ clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist *.o *.d *.a $(PROGRAMS)
#======================================================================
FLAGS += $(MYFLAGS) -fPIC
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS += $(FLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
# ============================================================================
# a variable definition to check variable settings
# ------------------------------------------------
......@@ -76,6 +68,16 @@ CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_BROWSER TF_WWWBASEDIR)
#----------------------------------------------------------------------
FLAGS += $(MYFLAGS) -fPIC
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS += $(FLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
#======================================================================
# Fortran dependencies
# --------------------
......
......@@ -75,7 +75,10 @@ $(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR)
FLAGS += $(MYFLAGS)
FFLAGS += -Wall -ff2c -ffixed-line-length-0 -fno-backslash $(FLAGS) \
-fimplicit-none -pedantic
CFLAGS += -O3 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} $(FLAGS)
CFLAGS += -O3 $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
LIBEMODSUB=psexdat.o readgemini.o efa.o readrefmet.o earthmod.o \
readanigemini.o
......@@ -89,7 +92,10 @@ libemod.a: $(LIBEMODSUB)
ar rcv libemod.a $(LIBEMODSUB)
ranlib libemod.a
efa.doc: efa.f
extractdoc.tcl efa.f > efa.doc
efa.doc: %.doc: %.f
/usr/bin/awk 'BEGIN{ hot=0; } \
/^\/\*S\*\// { hot=1; next; } \
/^\/\*E\*\// { hot=0; } \
{ if (hot==1) { print " " $$0; } }' $^ > $@
# ----- END OF Makefile -----
......@@ -93,8 +93,9 @@ endif
FLAGS+=-fPIC $(MYFLAGS)
CXXFLAGS+=$(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) -I$(SERVERINCLUDEDIR) $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
flist: Makefile $(HEADERS) $(SRC) doxydoc.cfg $(EXSRC)
echo $^ | tr ' ' '\n' | sort > $@
......
......@@ -44,13 +44,13 @@ $(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
FLAGS=
CXXFLAGS=-Wall -pedantic $(FLAGS) -O3
CXXFLAGS=-Wall $(FLAGS) -O3
LDFLAGS=-L$(LOCLIBDIR)
CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS)
CC=gcc
CFLAGS=-O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
FLAGS += $(MYFLAGS)
CFLAGS += -O2 $(FLAGS)
FFLAGS += -ff2c -Wall -ffixed-line-length-none $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
#----------------------------------------------------------------------
# standard edit targets
......
......@@ -85,7 +85,10 @@ RANLIB=ranlib
FLAGS+=$(MYFLAGS)
FFLAGS += -ff2c -Wall -ffixed-line-length-none $(FLAGS)
CFLAGS += -O2 -I${SERVERINCLUDEDIR} $(FLAGS)
CFLAGS += -O2 $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
#----------------------------------------------------------------------
# documentation
......
......@@ -112,14 +112,17 @@ clean: ;
#----------------------------------------------------------------------
FLAGS += $(MYFLAGS)
F2CLIB=-lm -lf2c -L${SERVERLIBDIR}
F2CFLAGS=-f -u
CFLAGS += -O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} $(FLAGS)
CFLAGS += -O2 $(FLAGS)
FFLAGS += -ff2c -ffixed-line-length-none -Wall $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
#----------------------------------------------------------------------
%.o: %.c
$(CC) -O2 -o $@ -c $< -Wall $(CFLAGS) \
-I$(LOCINCLUDEDIR) -I$(SERVERINCLUDEDIR)
$(CC) -O2 -o $@ -c $< -Wall $(CFLAGS) $(CPPFLAGS)
%.o: %.f
$(FC) -O2 -o $@ -c $< $(FFLAGS)
......
......@@ -69,12 +69,6 @@ clean:
edit: flist ; vim flist
flist: *.c *.h *.f Makefile ; echo $^ | tr ' ' '\n' | sort > $@
FLAGS += $(MYFLAGS)
F2CLIB=-lm -lf2c -L${SERVERLIBDIR}
F2CFLAGS=-f -u
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS += -O3 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} $(FLAGS)
# ============================================================================
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
......@@ -82,6 +76,14 @@ CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR)
INCLUDEFLAGS=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR)))
LIBFLAGS=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
FLAGS += $(MYFLAGS)
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS += -O3 $(INCLUDEFLAGS) $(FLAGS)
CPPFLAGS += $(INCLUDEFLAGS) $(FLAGS)
LDFLAGS += $(LIBFLAGS) $(FLAGS)
AR=ar
RANLIB=ranlib
......@@ -138,8 +140,7 @@ clean-include: libtf.h
# compile
%.o: %.c
$(CC) -O2 -o $@ -c $< -Wall $(CFLAGS) \
-I$(LOCINCLUDEDIR) -I$(SERVERINCLUDEDIR)
$(CC) -O2 -o $@ -c $< -Wall $(CFLAGS) $(CPPFLAGS)
%.o: %.f
$(FC) -O2 -o $@ -c $< $(FFLAGS)
......@@ -148,8 +149,7 @@ libtf.a: $(SUBS)
$(RANLIB) libtf.a
testlibtf: testlibtf.o libtf.a
$(FC) -o $@ $< -ltf -lm -lgsl -lgslcblas $(FFLAGS) \
-L$(LOCLIBDIR) -L$(SERVERLIBDIR)
$(FC) -o $@ $< -ltf -lm -lgsl -lgslcblas $(FFLAGS) $(LDFLAGS)
#======================================================================
# testcode
......
......@@ -106,7 +106,9 @@ FLAGS+=-fPIC $(MYFLAGS)
F2CFLAGS=-f -u
FFLAGS += -Wall -ff2c $(FLAGS)
CFLAGS += -O2 $(FLAGS)
CPPFLAGS += -I. -I${LOCINCLUDEDIR} $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
# how to link the different varieties
LIBTIME=-ltime -L$(LOCLIBDIR)
......
......@@ -79,7 +79,10 @@ RANLIB=ranlib
FLAGS += $(MYFLAGS)
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS += -O3 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} $(FLAGS)
CFLAGS += -O3 $(FLAGS)
LDFLAGS+=$(addprefix -L,$(LOCLIBDIR) $(subst :, ,$(SERVERLIBDIR)))
CPPFLAGS+=$(addprefix -I,$(LOCINCLUDEDIR) $(subst :, ,$(SERVERINCLUDEDIR))) \
$(FLAGS)
LIBTSOBS=libts.o
......
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