2 # Makefile template for the Alice HLT HOMER library
4 # This is a ported version of the HOMER library of the HLT
5 # PubSub package HLT-stable-20070905.141318 (rev 2375) on Sep 14 2007
10 AM_CPPFLAGS = -DMODULE=$(MODULE) \
11 $(foreach i, $(ROOT_DEFS), -D$(i))
14 # for now we only create the version with ROOT support
15 # the build system is not completely ready yet, the approach with the copied
16 # sources and replacement of USE_ROOT is not yet working. Send an email to
17 # Matthias.Richter@ift.uib.no if you need this feature
18 #lib_LTLIBRARIES = libHOMER.la libAliHLTHOMER.la
19 lib_LTLIBRARIES = libAliHLTHOMER.la
21 # version info for the library
22 LIBRARY_VERSION = '0:0:0'
24 # MODDIR is set by the AliRoot build system and denotes the topdir
25 # of the module, we must set it since the package definition libAliHLTHOMER.pkg
26 # includes another common configuration file
27 MODDIR = $(top_srcdir)
28 PKGDEF = $(MODDIR)/libAliHLTHOMER.pkg
30 include $(top_srcdir)/libAliHLTHOMER.pkg
32 NOROOT_SRC = $(MODULE_SRCS:.cxx=_noRoot.cxx)
34 # ##########################################################
35 # general settings for both libraries
37 HOMER_DOC = HOMERReader.tex
39 EXTRA_DIST = $(HOMER_DOC)
41 # automatic generation of data and time of library build
42 COMPILE_INFO = AliHLTHOMERCompileInfo.cxx
45 pkginclude_HEADERS = $(MODULE_HDRS) $(MODULE_DHDR)
47 # ##########################################################
48 # library version with ROOT support
52 libAliHLTHOMER_la_SOURCES = $(MODULE_SRCS)
55 libAliHLTHOMER_la_LDFLAGS = -L@ROOTLIBDIR@ \
57 -version-info $(LIBRARY_VERSION)
59 # set the file name for the generated root dictionary
60 DICTCPP = HOMER-DICT.cxx
61 nodist_libAliHLTHOMER_la_SOURCES = $(COMPILE_INFO) \
64 # ##########################################################
65 # library version w/o ROOT support
67 # enable this if library w/o ROOT support is build
69 # # library sources (generated)
70 # nodist_libHOMER_la_SOURCES = $(COMPILE_INFO) \
74 # libHOMER_la_LDFLAGS = -version-info $(LIBRARY_VERSION)
76 # ##########################################################
78 CLEANFILES = $(COMPILE_INFO) \
81 DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h)
82 DICTHEADERS = $(CLASS_HDRS)
84 CLEANFILES += $(DICTFILES)
86 # the rootcint buffer for macros is limited to 1024 characters
87 # we have to filter out some of the defines
88 DEFFILTER = -DPACKAGE* -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
90 # as the first step of the migration of the HOMER library to
91 # AliRoot we leave the class names as they are but change the
92 # file names. Thats why the automatic generation of the ROOT
93 # LinkDef file doesn't work for the moment
94 $(DICTCPP:.cxx=.h): $(DICTCPP)
95 if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi
97 $(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(MODULE_DHDR)
98 if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) \
99 `for i in $(DEFS);do case $$i in $(foreach def, $(DEFFILTER), $(def) |) -DVERSION*);; *) echo -n " $$i";; esac; done` \
100 $(foreach i, $(DICTINCLUDE), $(i)) \
103 # include $(top_srcdir)/make.dict
105 $(NOROOT_SRC): $(MODULE_SRCS)
106 cat $(srcdir)/$(@:_noRoot.cxx=.cxx) $(foreach i, $(ROOT_DEFS), | sed -e "s|$(i)|FALSE|") > $@
108 $(COMPILE_INFO): $(libAliHLTUtil_la_SOURCES) $(pkginclude_HEADERS) $(noinst_HEADERS) Makefile.am
109 @echo '//automatically generated compilation info' > $@
110 @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
111 @echo '//add changes in Makefile.am' >> $@
112 @echo 'extern "C" void CompileInfo( char*& date, char*& time)' >> $@
113 @echo '{date=__DATE__; time=__TIME__; return;}' >> $@
115 all-local: $(HOMER_DOC:.tex=.ps) $(HOMER_DOC:.tex=.pdf)
118 rm -f $(HOMER_DOC:.tex=.pdf) $(HOMER_DOC:.tex=.ps) $(HOMER_DOC:.tex=.dvi) $(HOMER_DOC:.tex=.aux) $(HOMER_DOC:.tex=.log)
120 $(HOMER_DOC:.tex=.pdf): $(HOMER_DOC:.tex=.ps)
121 ps2pdf13 -dEmebedAllFonts=true $^
123 $(HOMER_DOC:.tex=.ps): $(HOMER_DOC:.tex=.dvi)
126 $(HOMER_DOC:.tex=.dvi): $(HOMER_DOC)