Commit 7264b888 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

implemented rules for shared libraries

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/branches/libdatrwxx.su2
SVN Revision: 3519
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 052b529e
......@@ -67,7 +67,7 @@
# You will find the installed library header files in $(LOCINCLUDEDIR)/aff
all: install doxydoc
install: install-include libaff.a
install: install-include libaff.a libaff.so
# ============================================================================
# a variable definition to check variable settings
......@@ -128,7 +128,7 @@ endif
# compiler and preprocessor flags
# -------------------------------
FLAGS=
FLAGS+=$(MYFLAGS)
FLAGS+=$(MYFLAGS) -fPIC
CXXFLAGS+=-Wall $(FLAGS) -O3
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
......@@ -175,6 +175,10 @@ libaff.a: $(INSTHEADER) $(LIBOBS)
ranlib $@
/bin/mv -vf $@ $(LIBINSTALLPATH)
libaff.so: $(INSTHEADER) $(LIBOBS)
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBS)
/bin/mv -fpv $@ $(LOCLIBDIR)
#======================================================================
# dependencies
# ------------
......
......@@ -41,7 +41,7 @@
#
all: install doxydoc
install: install-include libdatrwxx.a
install: install-include libdatrwxx.a libdatrwxx.so
# ============================================================================
#
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
......@@ -86,7 +86,7 @@ endif
#
FLAGS=
FLAGS+=$(MYFLAGS)
FLAGS+=-fPIC $(MYFLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
......@@ -141,6 +141,10 @@ libdatrwxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
ranlib $@
/bin/mv -fv $@ $(LOCLIBDIR)
libdatrwxx.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^
/bin/mv -fv $@ $(LOCLIBDIR)
#----------------------------------------------------------------------
# comment stripping
......
......@@ -30,7 +30,7 @@
#
all: install doxydoc
install: install-include libfapidxx.a
install: install-include libfapidxx.a libfapidxx.so
# check mandatory environment variable settings
# ---------------------------------------------
......@@ -49,7 +49,7 @@ FSRC=$(wildcard *.f)
SRC=$(CCSRC)
README=README
FLAGS += $(MYFLAGS)
FLAGS += $(MYFLAGS) -fPIC
FFLAGS += -ff2c -Wall -ffixed-line-length-0 -fno-backslash $(FLAGS)
CFLAGS += $(FLAGS)
CXXFLAGS+=-Wall $(FLAGS)
......@@ -154,6 +154,10 @@ libfapidxx.a: $(INSTHEADER) $(LIBOBS)
ranlib $@
/bin/mv -vf $@ $(LIBINSTALLPATH)
libfapidxx.so: $(INSTHEADER) $(LIBOBS)
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBS)
/bin/mv -fpv $@ $(LOCLIBDIR)
#======================================================================
# documentation part
# ------------------
......
......@@ -32,7 +32,7 @@
#
all: install libfourier.doc doxydoc
install: install-include libfourier.a libfourierxx.a
install: install-include libfourier.a libfourierxx.a libfourierxx.so
flist: Makefile $(wildcard *.f *.inc *.h *.cc *.c README *.cfg)
echo $^ | tr ' ' '\n' | sort > $@
......@@ -71,11 +71,12 @@ RANLIB=ranlib
FFTWLIB=-lfftw3
#----------------------------------------------------------------------
CFLAGS += -O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}
CPPFLAGS += -O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR} \
$(FFTWFALLBACK)
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)
LIBSRC=$(wildcard *.f)
LIBOBS=$(patsubst %.f,%.o,$(LIBSRC))
......@@ -184,6 +185,10 @@ libfourierxx.a: install-include $(LIBOBSXX)
ranlib $@
/bin/mv -fv $@ $(LOCLIBDIR)
libfourierxx.so: install-include $(LIBOBSXX)
$(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBSXX)
/bin/mv -fv $@ $(LOCLIBDIR)
#======================================================================
# dependencies
# ------------
......
......@@ -61,7 +61,7 @@
#
all: install doxydoc
install: install-include libgsexx.a
install: install-include libgsexx.a libgsexx.so
# ============================================================================
# a variable definition to check variable settings
......@@ -78,7 +78,7 @@ $(call CHECKVARS,TF_BROWSER TF_WWWBASEDIR)
#----------------------------------------------------------------------
FLAGS=
FLAGS+=$(MYFLAGS)
FLAGS+=-fPIC $(MYFLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
......@@ -121,6 +121,10 @@ libgsexx.a: $(patsubst %.cc,%.o,$(LIBSRC)) $(LOCLIBDIR)
ranlib $@
/bin/mv -fv $@ $(LOCLIBDIR)
libgsexx.so: $(patsubst %.cc,%.o,$(LIBSRC)) $(LOCLIBDIR)
$(CXX) $(CXXFLAGS) -shared -o $@ $(patsubst %.cc,%.o,$(LIBSRC))
/bin/mv -fv $@ $(LOCLIBDIR)
install-include: $(LOCINCLUDEDIR)
/bin/cp -fv gsexx.h $<
......
......@@ -35,7 +35,7 @@
#
all: install doxydoc
install: install-include liblinearxx.a
install: install-include liblinearxx.a liblinearxx.so
# ============================================================================
#
......@@ -80,7 +80,7 @@ endif
#
FLAGS=
CXXFLAGS+=-Wall $(FLAGS)
CXXFLAGS+=-Wall -fPIC $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR) $(TF_LINK_FORTRAN)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
......@@ -117,6 +117,10 @@ liblinearxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
ranlib $@
/bin/mv -fv $@ $(LOCLIBDIR)
liblinearxx.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^
/bin/mv -fv $@ $(LOCLIBDIR)
#----------------------------------------------------------------------
# comment stripping
......
......@@ -38,7 +38,7 @@
#
all: install example doxydoc
install: install-include libpgplotCpp.a
install: install-include libpgplotCpp.a libpgplotCpp.so
# ============================================================================
#
......@@ -82,7 +82,7 @@ ifndef TF_REMCMMNT
TF_REMCMMNT=cat
endif
FLAGS+=$(MYFLAGS)
FLAGS+=-fPIC $(MYFLAGS)
CXXFLAGS+=$(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) -I$(SERVERINCLUDEDIR) $(FLAGS)
......@@ -124,6 +124,10 @@ libpgplotCpp.a: $(SRC:.cc=.o)
ranlib $@
/bin/mv -vf $@ $(LIBINSTALLPATH)
libpgplotCpp.so: $(SRC:.cc=.o)
$(CXX) $(CXXFLAGS) -shared -o $@ $^
/bin/mv -fpv $@ $(LIBINSTALLPATH)
#----------------------------------------------------------------------
# comment stripping
......
......@@ -34,7 +34,7 @@
# ============================================================================
all: install doxydoc
install: install-include libserialxx.a
install: install-include libserialxx.a libserialxx.so
#=============================================================================
......@@ -75,7 +75,7 @@ endif
# ------------
#
FLAGS=
FLAGS+=-fPIC
CXXFLAGS=-fhonor-std -Wall $(FLAGS)
CXXFLAGS=-Wall $(FLAGS)
LDFLAGS=-L$(LOCLIBDIR)
......@@ -116,6 +116,10 @@ libserialxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
ranlib $@
/bin/mv -fv $@ $(LOCLIBDIR)
libserialxx.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^
/bin/mv -fpv $@ $(LOCLIBDIR)
#----------------------------------------------------------------------
# comment stripping
......
......@@ -38,7 +38,7 @@
#
all: install doxydoc
install: install-include libsffxx.a
install: install-include libsffxx.a libsffxx.so
# ============================================================================
# a variable definition to check variable settings
......@@ -52,7 +52,7 @@ $(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR LOCBINDIR)
$(call CHECKVARS,TF_BROWSER TF_WWWBASEDIR)
FLAGS=
FLAGS+=$(MYFLAGS)
FLAGS+=-fPIC $(MYFLAGS)
CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
......@@ -94,6 +94,10 @@ libsffxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
ranlib $@
/bin/mv -fv $@ $(LOCLIBDIR)
libsffxx.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^
/bin/mv -fv $@ $(LOCLIBDIR)
#----------------------------------------------------------------------
# header files
# ------------
......
......@@ -54,12 +54,17 @@
# - package creation not yet implemented
# - set TF_REMCMMNT to cat if not defined
# - remove REGEXX options
# 01/12/2010 V1.6 disabled newly invented shared library
# linking to libtfxx.so also requires
# libgsl and libboost in cases where the main program
# doesn't need them; this is a linker issue
#
# ============================================================================
#
all: install doxydoc
install: install-include libtfxx.a
install: install-include libtfxx.a
#libtfxx.so
# ============================================================================
#
......@@ -112,7 +117,7 @@ else
REGEXXFLAG=
endif
FLAGS=$(MYFLAGS)
FLAGS=-fPIC $(MYFLAGS)
CXXFLAGS=-fhonor-std -Wall $(FLAGS)
CXXFLAGS=$(FLAGS)
LDFLAGS=-L$(LOCLIBDIR) $(TF_LINK_REGEXX)
......@@ -157,6 +162,11 @@ libtfxx.a: $(SRC:.cc=.o)
ranlib $@
/bin/mv -vf $@ $(LIBINSTALLPATH)
libtfxx.so: $(SRC:.cc=.o)
$(CXX) $(CXXFLAGS) -shared -o $@ $^ -lgsl -lboost_regex -lgslcblas \
-ltsxx -L$(LOCLIBDIR)
/bin/mv -fv $@ $(LIBINSTALLPATH)
#----------------------------------------------------------------------
# comment stripping
......
......@@ -57,7 +57,7 @@ install: install-include libraries
doc: doxydoc libtime.doc
example: tests/example++; tests/example++
exectests: tests
libraries: libtime_trad.a libtime.a libctime.a libtime++.a
libraries: libtime_trad.a libtime.a libctime.a libtime++.a libtime++.so
# ============================================================================
# a variable definition to check variable settings
......@@ -91,7 +91,7 @@ AS=as
RANLIB=ranlib
FLAGS=
FLAGS+=$(MYFLAGS)
FLAGS+=-fPIC $(MYFLAGS)
F2CFLAGS=-f -u
FFLAGS += -Wall -ff2c $(FLAGS)
CFLAGS += -O2 $(FLAGS)
......@@ -262,9 +262,15 @@ libctime.a: $(patsubst %.f,%.o,$(KERNEL)) \
$(patsubst %.c,%.o,$(CWRAPPER) $(CCODE) $(CHANDLER))
# C++ classlib
libtime++.a: $(patsubst %.f,%.o,$(KERNEL)) \
$(patsubst %.c,%.o,$(CWRAPPER) $(CCODE) $(CXXHANDLER)) \
$(patsubst %.cc,%.o,$(CXXCODE))
libtime++.so libtime++.a: $(patsubst %.f,%.o,$(KERNEL)) \
$(patsubst %.c,%.o,$(CWRAPPER) $(CCODE)) \
$(patsubst %.cc,%.o,$(CXXCODE) $(CXXHANDLER))
libtime++.so: $(patsubst %.f,%.o,$(KERNEL)) \
$(patsubst %.c,%.o,$(CWRAPPER) $(CCODE)) \
$(patsubst %.cc,%.o,$(CXXCODE) $(CXXHANDLER))
$(CXX) $(CXXFLAGS) -shared -o $@ $^
/bin/mv -fv $@ $(LOCLIBDIR)
#======================================================================
#
......
......@@ -34,11 +34,16 @@
# - set TF_REMCMMNT to cat if not defined
# - new doxygen definitions
# - package creation not yet implemented
# 01/12/2010 V1.3 disabled newly invented shared library
# linking to libtfxx.so also requires
# libseife even in cases where the main program
# doesn't need them; this is a linker issue
#
# ============================================================================
all: install doxydoc
install: install-include libtsxx.a
#libtsxx.so
# ============================================================================
#
......@@ -80,7 +85,7 @@ endif
#
FLAGS=
CXXFLAGS+=-Wall $(FLAGS)
CXXFLAGS+=-fPIC -Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
......@@ -116,6 +121,10 @@ libtsxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
ranlib $@
/bin/mv -fv $@ $(LOCLIBDIR)
libtsxx.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^ -lseife -L$(LOCLIBDIR)
/bin/mv -fv $@ $(LOCLIBDIR)
#----------------------------------------------------------------------
# comment stripping
......
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