Commit 1854f4ca authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

modified Makefiles to create installation directories for binaries

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.
see ticket:170


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4497
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 34a4c522
......@@ -23,9 +23,11 @@ PROGRAMS=fidase fidasex
all: install
.PHONY: install
install:
$(MAKE) $(PROGRAMS)
/bin/mv -fv $(PROGRAMS) $(LOCBINDIR)
install: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
#
# This is the sequence of standard targets
# ----------------------------------------
......@@ -165,11 +167,16 @@ libdatrwxx.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^
LIBRARIES=libaff.a libdatrwxx.so
.PHONY: install
install:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $^ $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
# install-include where no header files are to be installed
.PHONY: install-include
install-include:
#======================================================================
# reinstall target
......
......@@ -28,6 +28,17 @@
#
# ============================================================================
#
PROGRAMS=DL1logger DL1direct
.PHONY: all
all: install
.PHONY: install
install: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
HEADERS=$(wildcard *.h)
......@@ -35,8 +46,6 @@ SUBSRC=error.cc dataline.cc record.cc thiesdl1.cc functions.cc memory.cc \
logger.cc cvsids.cc
SUBOBS=$(patsubst %.cc,%.o,$(SUBSRC))
all: DL1logger DL1direct
flist: Makefile $(wildcard *.cc *.h *.cfg *.sh *.tex *.conf) README
echo $^ | tr ' ' '\n' | sort > $@
......@@ -48,11 +57,19 @@ clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist *.o *.xxx *.d
FLAGS=
CXXFLAGS=-fhonor-std -Wall $(FLAGS)
CXXFLAGS=-Wall $(FLAGS)
LDFLAGS=-L$(LOCLIBDIR)
CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS)
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)
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)
#----------------------------------------------------------------------
......@@ -104,7 +121,6 @@ tester DL1direct DL1logger: %: %.o $(SUBOBS)
$(CXX) $(FLAGS) -o $@ $^ -I$(LOCINCLUDEDIR) \
-ltsxx -lsffxx -lgsexx -lserialxx -ltime++ -ltfxx -laff \
-L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCBINDIR)
#======================================================================
# documentation
......
......@@ -11,8 +11,16 @@
#
# ============================================================================
#
PROGRAMS=mgm2sff mgm2sffstat
all:
.PHONY: all
all: install
.PHONY: install
install: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
flist: Makefile $(wildcard *.cc *.sh)
echo $^ | tr ' ' '\n' | sort > $@
......@@ -35,13 +43,10 @@ mgm2sff: %: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) \
-lsffxx -ltime++ -lgsexx -laff -ltsxx -ldatrwxx \
-ltfxx -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
/bin/cp -vpd $@ $(LOCBINDIR)
mgm2sffstat: %stat: %.o
$(CXX) -static -o $@ $^ -I$(LOCINCLUDEDIR) \
-lsffxx -ltime++ -lgsexx -laff -ltsxx -ldatrwxx \
-ltfxx -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
/bin/cp -vpd $@ $(LOCBINDIR)
# ----- END OF Makefile -----
......@@ -74,9 +74,11 @@ PROGRAMS=greda gabor phadi hivexpanco hivgabor grereso gaborx phadix gredax
.PHONY: all
all: install
$(LOCBINDIR): ; mkdir -pv $@
.PHONY: install
install: $(PROGRAMS)
/bin/mv -fv $^ $(LOCBINDIR)
install: $(LOCBINDIR)
$(MAKE) $(PROGRAMS)
/bin/mv -fv $(PROGRAMS) $(LOCBINDIR)
#----------------------------------------------------------------------
# standard edit targets
......
......@@ -51,6 +51,7 @@
#
# ============================================================================
#
PROGRAMS=gremlin wgremlin gredim
.PHONY: all
all: install
......@@ -59,15 +60,21 @@ all: install
install:
(cd cxx; $(MAKE) install)
$(MAKE) libraries
$(MAKE) allhere
$(MAKE) programs
.PHONY: libraries
libraries:
(cd cxx; $(MAKE) install)
(cd libs; $(MAKE) libs)
.PHONY: allhere
allhere: gremlin wgremlin gredim gremlin.pdf
.PHONY: programs
programs: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
.PHONY: doc
doc: gremlin.pdf
# check mandatory environment variable settings
# ---------------------------------------------
......@@ -125,7 +132,6 @@ gremlin: gremlin.o gremlin_help.o
-lgrrefsub -lrefread \
$(LINLIB) -ltf \
$(BUGGY) -L$(LOCLIBDIR) $(TF_LINK_PGPLOT) $(LDFLAGS)
/bin/mv -fv $@ $(LOCBINDIR)
# version using wang code
wgremlin: gremlin.o gremlin_help.o
......@@ -134,7 +140,6 @@ wgremlin: gremlin.o gremlin_help.o
-lwrefsub -lrefread \
$(LINLIB) -ltf $(TF_LINK_PGPLOT) \
$(BUGGY) -L$(LOCLIBDIR) $(LDFLAGS)
/bin/mv -fv $@ $(LOCBINDIR)
gredim: gredim.o
$(FC) -o gredim gredim.o $(GFLAG) $(F2CLIB) $(LDFLAGS)
......
......@@ -49,6 +49,7 @@
.PHONY: all
all: install doxydoc
.PHONY: doc
doc: doxydoc
......@@ -140,9 +141,13 @@ libgremlin1xx.a: install-include $(LIBOBS)
ranlib $@
LIBRARIES=libgremlin1xx.a
$(LOCLIBDIR): ; mkdir -pv $@
.PHONY: install
install: $(LIBRARIES)
/bin/mv -vf $^ $(LIBINSTALLPATH)
install: $(LOCLIBDIR)
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
#======================================================================
# dependencies
......
......@@ -49,8 +49,11 @@ doc: docs
LIBRARIES=libginmod.a libgindat.a libgininv.a libginpar.a libginpg.a libgin.a \
libginres.a
libs: $(LIBRARIES)
/bin/mv -fv $^ $(LOCLIBDIR)
.PHONY: libs
libs: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $< $(LOCLIBDIR)
# check mandatory environment variable settings
# ---------------------------------------------
......
......@@ -108,9 +108,10 @@ PROGRAMS=polex moche moval motab clemo splimo mocon mop pmotra mocox grestf \
all: install
.PHONY: install
install: $(PROGRAMS)
/bin/mv -fv $^ $(LOCBINDIR)
install: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
# check mandatory environment variable settings
# ---------------------------------------------
......
......@@ -49,7 +49,16 @@
# ============================================================================
#
all: grepg
PROGRAMS=grepg
.PHONY: all
all: install
.PHONY: install
install: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
......@@ -100,6 +109,5 @@ grepg_ardim.xxx.inc: grepg_ardim.inc; /bin/cp -v $< $@
grepg: $(GREBOBS)
$(FC) $(FFLAGS) $^ -o $@ \
-ltf $(TF_LINK_PGPLOT) $(LDFLAGS)
/bin/mv -fv $@ $(LOCBINDIR)
# ----- END OF Makefile -----
......@@ -35,9 +35,11 @@ PROGRAMS=dig gresy gresynoise syg rhesyg wsyg gresyx
.PHONY: all
all: install
$(LOCBINDIR): ; mkdir -pv $@
.PHONY: install
install: $(PROGRAMS)
/bin/mv -fv $^ $(LOCBINDIR)
install: $(LOCBINDIR)
$(MAKE) $(PROGRAMS)
/bin/mv -fv $(PROGRAMS) $(LOCBINDIR)
# check mandatory environment variable settings
# ---------------------------------------------
......
......@@ -30,8 +30,16 @@
# ============================================================================
#
all: gredi grenorm gretap greto magres
install: all
PROGRAMS=gredi grenorm gretap greto magres
.PHONY: all
all: install
.PHONY: install
install: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
# check mandatory environment variable settings
# ---------------------------------------------
......@@ -67,8 +75,7 @@ clean: ;
echo $<: $(shell cat $< | egrep '^ +include' | cut -f 2 -d \' | sort | uniq) > $@
-include $(patsubst %.f,%.d,$(wildcard *.f))
%: %.f
$(PROGRAMS): %: %.f
$(FC) $(FFLAGS) -o $@ $^ -ltf -lsff $(LDFLAGS)
/bin/mv -fv $@ $(LOCBINDIR)
# ----- END OF Makefile -----
......@@ -76,11 +76,12 @@ all: install doc
doc: doxydoc
LIBRARIES=libaff.a libaff.so
.PHONY: install
install:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
# ============================================================================
# a variable definition to check variable settings
......
......@@ -25,10 +25,13 @@ all: install
doc:
.PHONY: install
install:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
.PHONY: install-include
install-include:
.PHONY: reinstall
reinstall:
......
......@@ -63,16 +63,17 @@ PROGRAMS=libdatrwxxinfo
.PHONY: install
install: installlibs installbin
.PHONY: installlibs
installlibs:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
.PHONY: installbin
installbin:
$(MAKE) $(PROGRAMS)
/bin/mv -fv $(PROGRAMS) $(LOCBINDIR)
installbin: $(addprefix $(LOCBINDIR)/,$(PROGRAMS))
$(LOCBINDIR)/%: %
mkdir -pv $(LOCBINDIR)
/bin/mv -fv $< $(LOCBINDIR)
.PHONY: installlibs
installlibs: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
# ============================================================================
#
......
......@@ -36,6 +36,8 @@
# ============================================================================
#
LIBRARIES=libemod.a
.PHONY: all
all: install
......@@ -43,18 +45,20 @@ all: install
.PHONY: doc
doc:
LIBRARIES=libemod.a
.PHONY: install
install:
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
.PHONY: reinstall
reinstall:
$(MAKE) clean
$(MAKE) install
.PHONY: install-include
install-include:
#----------------------------------------------------------------------
flist: Makefile $(wildcard *.f)
......
......@@ -40,10 +40,10 @@ doc: doxydoc
LIBRARIES=libfapidxx.a libfapidxx.so
.PHONY: install
install:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
# check mandatory environment variable settings
# ---------------------------------------------
......
......@@ -46,10 +46,10 @@ LIBRARIES=libfourier.a libfourierxx.a
#shared: libfourierxx.so
.PHONY: install
install:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
#----------------------------------------------------------------------
......
......@@ -70,10 +70,10 @@ doc: doxydoc
LIBRARIES=libgsexx.a libgsexx.so
.PHONY: install
install:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
.PHONY: reinstall
reinstall:
......
......@@ -34,10 +34,10 @@ LIBRARIES=libirdatoxx.a
all: doc install
.PHONY: install
install:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $^ $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
.PHONY: doc
doc: doxydoc
......
......@@ -43,12 +43,12 @@ doc: doxydoc
LIBRARIES=liblinearxx.a
# shared: liblinearxx.so
.PHONY: install
install:
$(MAKE) install-include
$(MAKE) $(LIBRARIES)
/bin/mv -fv $(LIBRARIES) $(LOCLIBDIR)
install: $(addprefix $(LOCLIBDIR)/,$(LIBRARIES))
$(LOCLIBDIR)/%: install-include %
mkdir -pv $(LOCLIBDIR)
/bin/mv -fv $(word 2,$^) $(LOCLIBDIR)
# ============================================================================
#
......
Markdown is supported
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