Trying to tie the same startup handler into different plugin libraries did not work quite well.

Therefore, a new library is built and the plugins link to that one.
This new library at the moment only contains the startup handler, however, finally it might serve as well for other routines
that are used by different plugins.
This commit is contained in:
Bastian M. Wojek 2011-03-19 11:44:56 +00:00
parent 653fcdcec8
commit 2d2cf448db
6 changed files with 77 additions and 31 deletions

View File

@ -490,6 +490,12 @@ AC_SUBST(PMUSR_LIBS)
AC_SUBST(PMUSR_CFLAGS)
if test "${BUILD_BMW_LIBS}" = "1"; then
BMWSTARTUP_SRCDIR="${SRCDIR}/external/BMWStartupHandler"
BMWSTARTUP_LIBS="${BMWSTARTUP_SRCDIR}/libBMWstartup.la"
BMWSTARTUP_CFLAGS="-I${BMWSTARTUP_SRCDIR}"
AC_SUBST(BMWSTARTUP_LIBS)
AC_SUBST(BMWSTARTUP_CFLAGS)
TFITPOFB_SRCDIR="${SRCDIR}/external/TFitPofB-lib"
TFITPOFB_LIBS="${TFITPOFB_SRCDIR}/classes/libTFitPofB.la"
TFITPOFB_CFLAGS="-I${TFITPOFB_SRCDIR}/include"
@ -627,6 +633,7 @@ AC_CONFIG_FILES([Makefile \
src/external/libCuba/Makefile \
src/external/libCuba/src/Makefile \
src/external/libCuba/src/cuba.pc \
src/external/BMWStartupHandler/Makefile \
src/external/TFitPofB-lib/Makefile \
src/external/TFitPofB-lib/classes/Makefile \
src/external/libLFRelaxation/Makefile \

View File

@ -0,0 +1,56 @@
## Process this file with automake to create Makefile.in
h_sources = \
BMWStartupHandler.h
h_linkdef = \
BMWStartupHandlerLinkDef.h
dict_h_sources = \
BMWStartupHandlerDict.h
cpp_sources = \
BMWStartupHandler.cpp
dict_cpp_sources = \
BMWStartupHandlerDict.cpp
include_HEADERS = $(h_sources)
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
INCLUDES = -I$(top_srcdir)/src/include $(LEM_CFLAGS) $(PMUSR_CFLAGS) $(ROOT_CFLAGS)
AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
CLEANFILES = *Dict.cpp *Dict.h *~ core
%Dict.cpp %Dict.h: %.h %LinkDef.h
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $^
lib_LTLIBRARIES = libBMWstartup.la
libBMWstartup_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
libBMWstartup_la_LIBADD = $(ROOT_LIBS)
libBMWstartup_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
## For the moment do not build pkgconfig files for musrfit plug-ins...
## pkgconfigdir = $(libdir)/pkgconfig
## pkgconfig_DATA = PTFitPofB.pc
## However, create some symbolic links to the shared library
## in order to unify the function call on different operating systems
if IS_DARWIN
install-exec-hook:
$(LN_S) $(libdir)/libBMWstartup.dylib $(libdir)/libBMWstartup.so
uninstall-hook:
rm -f $(libdir)/libBMWstartup.so
endif
if IS_CYGWIN
install-exec-hook:
$(LN_S) $(bindir)/cygBMWstartup-$(PLUGIN_MAJOR_VERSION)-$(PLUGIN_MINOR_VERSION)-$(PLUGIN_MAJOR_VERSION).dll $(libdir)/libBMWstartup.so
uninstall-hook:
rm -f $(libdir)/libBMWstartup.so
endif

View File

@ -8,10 +8,11 @@ if BUILD_CUBALIB
endif
if BUILD_BMWLIBS
BMWDIRS = TFitPofB-lib \
BMWDIRS = BMWStartupHandler \
TFitPofB-lib \
libLFRelaxation \
libGapIntegrals \
libCalcMeanFieldsLEM
libCalcMeanFieldsLEM
endif
SUBDIRS = $(ASDIRS) $(CUBADIRS) $(BMWDIRS)

View File

@ -1,9 +1,6 @@
## Process this file with automake to create Makefile.in
startup_path = ../../BMWStartupHandler
h_sources = \
$(startup_path)/BMWStartupHandler.h \
../include/TBofZCalc.h \
../include/TBulkTriVortexFieldCalc.h \
../include/TLondon1D.h \
@ -14,19 +11,16 @@ h_sources = \
../include/TVortex.h
h_linkdef = \
$(startup_path)/BMWStartupHandlerLinkDef.h \
../include/TLondon1DLinkDef.h \
../include/TVortexLinkDef.h \
../include/TSkewedGssLinkDef.h
dict_h_sources = \
$(startup_path)/BMWStartupHandlerDict.h \
TLondon1DDict.h \
TSkewedGssDict.h \
TVortexDict.h
cpp_sources = \
$(startup_path)/BMWStartupHandler.cpp \
TBulkTriVortexFieldCalc.cpp \
TBofZCalc.cpp \
TLondon1D.cpp \
@ -37,7 +31,6 @@ cpp_sources = \
TVortex.cpp
dict_cpp_sources = \
$(startup_path)/BMWStartupHandlerDict.cpp \
TLondon1DDict.cpp \
TSkewedGssDict.cpp \
TVortexDict.cpp
@ -45,16 +38,12 @@ dict_cpp_sources = \
include_HEADERS = $(h_sources)
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
INCLUDES = -I$(top_srcdir)/src/include -I../include -I$(startup_path) $(LEM_CFLAGS) $(PMUSR_CFLAGS) $(FFTW3_CFLAGS) $(ROOT_CFLAGS)
INCLUDES = -I$(top_srcdir)/src/include -I../include $(BMWSTARTUP_CFLAGS) $(LEM_CFLAGS) $(PMUSR_CFLAGS) $(FFTW3_CFLAGS) $(ROOT_CFLAGS)
AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
CLEANFILES = $(startup_path)/*Dict.cpp $(startup_path)/*Dict.h $(startup_path)/*~ \
*Dict.cpp *Dict.h *~ core
$(startup_path)/BMWStartupHandlerDict.cpp $(startup_path)/BMWStartupHandlerDict.h: $(startup_path)/BMWStartupHandler.h $(startup_path)/BMWStartupHandlerLinkDef.h
@ROOTCINT@ -v -f $(startup_path)/BMWStartupHandlerDict.cpp -c -p $(INCLUDES) $^
CLEANFILES = *Dict.cpp *Dict.h *~ core
%Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $^
@ -62,7 +51,7 @@ $(startup_path)/BMWStartupHandlerDict.cpp $(startup_path)/BMWStartupHandlerDict.
lib_LTLIBRARIES = libTFitPofB.la
libTFitPofB_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
libTFitPofB_la_LIBADD = $(LEM_LIBS) $(PMUSR_LIBS) $(FFTW3_LIBS) $(ROOT_LIBS)
libTFitPofB_la_LIBADD = $(BMWSTARTUP_LIBS) $(LEM_LIBS) $(PMUSR_LIBS) $(FFTW3_LIBS) $(ROOT_LIBS)
libTFitPofB_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
## For the moment do not build pkgconfig files for musrfit plug-ins...

View File

@ -18,7 +18,7 @@ dict_cpp_sources = \
include_HEADERS = $(h_sources)
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
INCLUDES = -I$(top_srcdir)/src/include -I../BMWStartupHandler $(TFITPOFB_CFLAGS) $(PMUSR_CFLAGS) $(ROOT_CFLAGS) $(FFTW3_CFLAGS)
INCLUDES = -I$(top_srcdir)/src/include $(BMWSTARTUP_CFLAGS) $(TFITPOFB_CFLAGS) $(PMUSR_CFLAGS) $(ROOT_CFLAGS) $(FFTW3_CFLAGS)
AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
@ -31,7 +31,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
lib_LTLIBRARIES = libCalcMeanFieldsLEM.la
libCalcMeanFieldsLEM_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
libCalcMeanFieldsLEM_la_LIBADD = $(TFITPOFB_LIBS) $(PMUSR_LIBS) $(ROOT_LIBS)
libCalcMeanFieldsLEM_la_LIBADD = $(BMWSTARTUP_LIBS) $(TFITPOFB_LIBS) $(PMUSR_LIBS) $(ROOT_LIBS)
libCalcMeanFieldsLEM_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
## For the moment do not build pkgconfig files for musrfit plug-ins...

View File

@ -1,40 +1,33 @@
## Process this file with automake to create Makefile.in
startup_path = ../BMWStartupHandler
integrator_path = ../BMWIntegrator
h_sources = \
TLFRelaxation.h \
$(startup_path)/BMWStartupHandler.h \
$(integrator_path)/BMWIntegrator.h
h_linkdef = \
TLFRelaxationLinkDef.h \
$(startup_path)/BMWStartupHandlerLinkDef.h
TLFRelaxationLinkDef.h
dict_h_sources = \
TLFRelaxationDict.h \
$(startup_path)/BMWStartupHandlerDict.h
TLFRelaxationDict.h
cpp_sources = \
TLFRelaxation.cpp \
$(startup_path)/BMWStartupHandler.cpp \
$(integrator_path)/BMWIntegrator.cpp
dict_cpp_sources = \
TLFRelaxationDict.cpp \
$(startup_path)/BMWStartupHandlerDict.cpp
TLFRelaxationDict.cpp
include_HEADERS = $(h_sources)
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
INCLUDES = -I$(top_srcdir)/src/include -I$(startup_path) $(PMUSR_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(ROOT_CFLAGS) $(CUBA_CFLAGS)
INCLUDES = -I$(top_srcdir)/src/include $(BMWSTARTUP_CFLAGS) $(PMUSR_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(ROOT_CFLAGS) $(CUBA_CFLAGS)
AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
CLEANFILES = $(startup_path)/*Dict.cpp $(startup_path)/*Dict.h $(startup_path)/*~ \
$(integrator_path)/*~ *Dict.cpp *Dict.h *~ core
CLEANFILES = $(integrator_path)/*~ *Dict.cpp *Dict.h *~ core
%Dict.cpp %Dict.h: %.h %LinkDef.h
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $^
@ -42,7 +35,7 @@ CLEANFILES = $(startup_path)/*Dict.cpp $(startup_path)/*Dict.h $(startup_path)/*
lib_LTLIBRARIES = libLFRelaxation.la
libLFRelaxation_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
libLFRelaxation_la_LIBADD = $(PMUSR_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(CUBA_LIBS)
libLFRelaxation_la_LIBADD = $(BMWSTARTUP_LIBS) $(PMUSR_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(CUBA_LIBS)
libLFRelaxation_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
## For the moment do not build pkgconfig files for musrfit plug-ins...