]>
Commit | Line | Data |
---|---|---|
33791895 | 1 | # $Id$ |
2 | # Makefile template for the Alice HLT sample library | |
3 | ||
4 | # This files defines the autotools-based build system of the | |
5 | # libAliHLTSample library. All lines starting with a '#' are comments. | |
6 | # Note: Source files definitions must be made in libAliHLTSample.pkg | |
7 | # For further information refer to the README. | |
8 | ||
9 | MODULE = AliHLTSample | |
10 | ||
11 | EXTRA_DIST = tutorial.c | |
12 | ||
13 | # include the pkg definition which actually contains the source | |
14 | # file definitions | |
15 | MODDIR = $(top_srcdir) | |
16 | PKGDEF = $(MODDIR)/libAliHLTSample.pkg | |
17 | include $(top_srcdir)/libAliHLTSample.pkg | |
18 | ||
19 | ||
20 | # library definition | |
21 | # The lib_LTLIBRARIES variable is a fixed variable of the autotools build | |
22 | # system. All libraries defined by the Makefile template have to be added | |
23 | # here. Since we aim for separated directories for different libraries | |
24 | # there will be only one library. | |
25 | lib_LTLIBRARIES = libAliHLTSample.la | |
26 | ||
27 | # version info for the library | |
28 | # The libtool program is used to created the library, a version number can | |
29 | # be specified by using the -version-info flag. This flag accepts an argument | |
30 | # of the form current[:revision[:age]]. | |
31 | # If either revision or age are omitted, they default to 0. Also note that | |
32 | # age must be less than or equal to the current interface number. Here are a | |
33 | # set of rules to help you update your library version information: | |
34 | # | |
35 | # 1. Start with version information of 0:0:0 for each libtool library. | |
36 | # 2. Update the version information only immediately before a public release | |
37 | # of your software. More frequent updates are unnecessary, and only | |
38 | # guarantee that the current interface number gets larger faster. | |
39 | # 3. If the library source code has changed at all since the last update, | |
40 | # then increment revision (c:r:a becomes c:r+1:a). | |
41 | # 4. If any interfaces have been added, removed, or changed since the last | |
42 | # update, increment current, and set revision to 0. | |
43 | # 5. If any interfaces have been added since the last public release, then | |
44 | # increment age. | |
45 | # 6. If any interfaces have been removed since the last public release, then | |
46 | # set age to 0. | |
47 | LIBRARY_VERSION = '1:0:0' | |
48 | ||
49 | # library sources | |
50 | # The source files are specified in libAliHLTSample.pkg | |
51 | libAliHLTSample_la_SOURCES = $(MODULE_SRCS) | |
52 | ||
53 | # library headers | |
54 | # The header files are specified in libAliHLTSample.pkg | |
55 | noinst_HEADERS = $(MODULE_HDRS) | |
56 | ||
57 | # compilation flags of the library | |
58 | # This is the place to add further include directories if you are | |
59 | # using external modules. The AliRoot/STEER and ROOT directories | |
60 | # are the default include directories. | |
61 | # Include paths within the HLT modules are automatically taken from the | |
62 | # EINCLUDE variable of the pkg definition | |
63 | # other AliRoot dependencies might need to added | |
64 | AM_CPPFLAGS = -DMODULE=$(MODULE) \ | |
65 | @HLTBASE_CPPFLAGS@ \ | |
66 | @ALIROOT_CPPFLAGS@ \ | |
67 | @ROOTCFLAGS@ \ | |
68 | $(foreach i, $(EINCLUDE), \ | |
69 | $(shell echo $(i) | sed -e "/HLT\//!d" -e "s|HLT/|-I$(top_srcdir)/|")) \ | |
70 | $(foreach i, $(EINCLUDE), \ | |
71 | $(shell echo $(i) | sed -e "/HLT\//d" -e "s|^|-I$(ALICE_ROOT)/|")) | |
72 | ||
73 | # linking flags of the library | |
74 | # This is the place to add further libraries if you are | |
75 | # using external modules. The AliRoot, ROOT and HLT base libraries | |
76 | # are added by default. | |
77 | # Also the version of the library | |
78 | libAliHLTSample_la_LDFLAGS = -L@ROOTLIBDIR@ \ | |
79 | @ROOTLIBS@ \ | |
80 | @HLTBASE_LDFLAGS@ \ | |
81 | @ALIROOT_LDFLAGS@ \ | |
82 | @ALIROOT_LIBS@ \ | |
83 | -version-info $(LIBRARY_VERSION) | |
84 | ||
85 | # automatic generation of data and time of library build | |
86 | COMPILE_INFO = AliHLTSampleCompileInfo.cxx | |
87 | ||
88 | # set the file name for the generated root dictionary | |
89 | DICTCPP = AliHLTSample-DICT.cxx | |
90 | nodist_libAliHLTSample_la_SOURCES= $(COMPILE_INFO) \ | |
91 | $(DICTCPP) | |
92 | ||
93 | CLEANFILES = $(COMPILE_INFO) | |
94 | ||
95 | ############################################################################### | |
96 | # | |
97 | # do not change anything below this line | |
98 | # | |
99 | DICTDEF = $(MODULE)-LinkDef.h | |
100 | DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTDEF) | |
101 | DICTHEADERS = $(CLASS_HDRS) | |
102 | ||
103 | CLEANFILES += $(DICTFILES) | |
104 | ||
105 | # the rootcint buffer for macros is limited to 1024 characters | |
106 | # we have to filter out some of the defines | |
107 | 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* -DHAVE_NOT_* | |
108 | ||
109 | ||
110 | $(DICTCPP:.cxx=.h): $(DICTCPP) | |
111 | if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi | |
112 | ||
113 | $(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(DICTDEF) | |
114 | if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) \ | |
115 | `for i in $(DEFS);do case $$i in $(foreach def, $(DEFFILTER), $(def) |) -DVERSION*);; *) echo -n " $$i";; esac; done` \ | |
116 | $(foreach i, $(DICTINCLUDE), $(i)) \ | |
117 | $^ ; fi | |
118 | ||
119 | $(DICTDEF): Makefile.am $(PKGDEF) | |
120 | @echo '//automatically generated ROOT DICT definition' > $@ | |
121 | @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@ | |
122 | @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@ | |
123 | @echo '#ifdef __CINT__' >> $@ | |
124 | @echo '#pragma link off all globals;' >> $@ | |
125 | @echo '#pragma link off all classes;' >> $@ | |
126 | @echo '#pragma link off all functions;' >> $@ | |
127 | @$(foreach i, $(DICTHEADERS), \ | |
128 | echo "#pragma link C++ class `echo $(i) | sed -e "s|.*/||g" -e "s|\.h.*||"`;" >> $@ ;) | |
129 | @echo '#endif' >> $@ | |
130 | ||
131 | $(COMPILE_INFO): $(libAliHLTSample_la_SOURCES) $(pkginclude_HEADERS) $(noinst_HEADERS) Makefile.am | |
132 | @echo '//automatically generated compilation info' > $@ | |
133 | @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@ | |
134 | @echo '//add changes in Makefile.am' >> $@ | |
135 | @echo 'extern "C" void CompileInfo(const char*& date, const char*& time)' >> $@ | |
136 | @echo '{date=__DATE__; time=__TIME__; return;}' >> $@ |