Vertex truncation settings moved to AliGenMC.
[u/mrichter/AliRoot.git] / build / module.tpl
CommitLineData
f0a26826 1
2ifndef PACKFFLAGS
3@PACKAGE@FFLAGS:=$(FFLAGS)
4else
5@PACKAGE@FFLAGS:=$(PACKFFLAGS)
6endif
7
8ifndef PACKCFLAGS
9@PACKAGE@CFLAGS:=$(CFLAGS)
10else
11@PACKAGE@CFLAGS:=$(PACKCFLAGS)
12endif
13
14ifndef PACKCXXFLAGS
15@PACKAGE@CXXFLAGS:=$(CXXFLAGS)
16else
17@PACKAGE@CXXFLAGS:=$(PACKCXXFLAGS)
18endif
19
20
21ifdef DHDR
22WITHDICT=YES
23else
24WITHDICT=
25endif
26
27#Extra include,libs etc.
28@PACKAGE@INC:=$(patsubst %,-I$(MODDIR)/%,$(EINCLUDE))
29@PACKAGE@ELIBS:=$(patsubst %,-l%,$(ELIBS))
30@PACKAGE@ELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR))
31
32#c sources and headers
33
34@PACKAGE@CS:=$(patsubst %,$(MODDIR)/%,$(CSRCS))
35@PACKAGE@CH:=$(patsubst %,$(MODDIR)/%,$(CHDRS))
36
37#Fortran sources
38@PACKAGE@FS:=$(patsubst %,$(MODDIR)/%,$(FSRCS))
39
40#c++ sources and header
41@PACKAGE@S:=$(patsubst %,$(MODDIR)/%,$(SRCS))
42@PACKAGE@H:=$(patsubst %,$(MODDIR)/%,$(HDRS))
43
44
45# Package Dictionary
46
47@PACKAGE@DH:=$(MODDIR)/$(DHDR)
48
49
50#All objects
51@PACKAGE@CO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o))
52TEMP:=$(FSRCS:.F=.o)
53@PACKAGE@FO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o))
54@PACKAGE@O:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(@PACKAGE@FO) $(@PACKAGE@CO)
55
56ifdef WITHDICT
57 @PACKAGE@DS:=$(MODDIRO)/G__@PACKAGE@.cxx
58 @PACKAGE@DO:=$(MODDIRO)/G__@PACKAGE@.o
59 @PACKAGE@DDEP:=$(@PACKAGE@DO:.o=.d)
60 @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d) $(@PACKAGE@DDEP)
61else
62 @PACKAGE@DS:=
63 @PACKAGE@DO:=
64 @PACKAGE@DDEP:=
65 @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d)
66endif
67
68
69#The actual library file
70
71@PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT)
72
73#The actual binary file
74
75@PACKAGE@BIN:=$(BINPATH)/@PACKAGE@
76
77
78# for using in the main Makefile
79
80ifeq ($(TYPE),lib)
81ALLLIBS += $(@PACKAGE@LIB)
82BINLIBS += -l@PACKAGE@
83else
84ALLEXECS += $(@PACKAGE@BIN)
85endif
86
87# include all dependency files
88INCLUDEFILES +=$(@PACKAGE@DEP)
89
90
91#local rules
92
93$(@PACKAGE@LIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
94 @echo "***** Linking library $@ *****"
95 $(SHLD) $(SOFLAGS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(SHLIB) -o $@ $(@PACKAGE@O) $(@PACKAGE@DO)
96
97$(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
98 @echo "***** Makeing executable $@ *****"
99 $(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@
100
101$(@PACKAGE@DS): $(@PACKAGE@H) $(@PACKAGE@DH)
102 @echo "***** Creating $@ *****";
103 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
104 @rootcint -f $@ -c $(CINTFLAGS) $^
105
106$(@PACKAGE@DO): $(@PACKAGE@DS)
107 @echo "***** (Re)compiling $< *****";
108 @$(CXX) -c $< -o $@ $(CXXFLAGS)
109
110#Different targets for the module
111
112all-@PACKAGE@: $(@PACKAGE@LIB)
113
114
115depend-@PACKAGE@: $(@PACKAGE@DEP)
116
117# determination of object files
118$(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
119 @echo "***** (Re)compiling $< *****";
120 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
121 $(CXX) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
122
123$(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d
124 @echo "***** (Re)compiling $< *****";
125 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
126 $(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
127
128$(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d
129 @echo "***** (Re)compiling $< *****";
130 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
131 $(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
132
133$(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d
134 @echo "***** (Re)compiling $< *****";
135 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
136 $(CC) -c $< -o $@ $(@PACKAGE@INC) $(@PACKAGE@CFLAGS)
137
138$(@PACKAGE@DDEP): $(@PACKAGE@DS)
139 @echo "***** Making dependencies for $< *****";
140 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
141 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
142
143$(MODDIRO)/%.d: $(MODDIRS)/%.cxx
144 @echo "***** Making dependencies for $< *****";
145 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
146 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
147$(MODDIRO)/%.d: $(MODDIRS)/%.f
148 @echo "***** Making dependencies for $< *****";
149 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
150 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
151$(MODDIRO)/%.d: $(MODDIRS)/%.F
152 @echo "***** Making dependencies for $< *****";
153 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
154 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
155$(MODDIRO)/%.d: $(MODDIRS)/%.c
156 @echo "***** Making dependencies for $< *****";
157 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
158 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
159
160
161#Directory creation
162
163#$(MODDIRO):
164# @echo "***** Making $@ *****"
165# mkdir -p $@
166
167
168
169
170
171
172
173
174
175
176