]>
Commit | Line | Data |
---|---|---|
117cfc60 | 1 | #-*- Mode: Makefile -*- |
f0a26826 | 2 | |
f347de98 | 3 | |
f0a26826 | 4 | ifndef PACKFFLAGS |
5 | @PACKAGE@FFLAGS:=$(FFLAGS) | |
6 | else | |
7 | @PACKAGE@FFLAGS:=$(PACKFFLAGS) | |
8 | endif | |
9 | ||
10 | ifndef PACKCFLAGS | |
11 | @PACKAGE@CFLAGS:=$(CFLAGS) | |
12 | else | |
13 | @PACKAGE@CFLAGS:=$(PACKCFLAGS) | |
14 | endif | |
15 | ||
16 | ifndef PACKCXXFLAGS | |
17 | @PACKAGE@CXXFLAGS:=$(CXXFLAGS) | |
18 | else | |
19 | @PACKAGE@CXXFLAGS:=$(PACKCXXFLAGS) | |
20 | endif | |
21 | ||
88cb7938 | 22 | ifndef PACKSOFLAGS |
23 | @PACKAGE@SOFLAGS:=$(SOFLAGS) | |
24 | else | |
25 | @PACKAGE@SOFLAGS:=$(PACKSOFLAGS) | |
26 | endif | |
27 | ||
28 | ifdef DYEXT | |
29 | ifndef PACKDYFLAGS | |
30 | @PACKAGE@DYFLAGS:=$(DYFLAGS) | |
31 | else | |
32 | @PACKAGE@DYFLAGS:=$(PACKDYFLAGS) | |
33 | endif | |
34 | endif | |
35 | ||
651e35f1 | 36 | ifndef PACKLDFLAGS |
37 | @PACKAGE@LDFLAGS:=$(LDFLAGS) | |
38 | else | |
39 | @PACKAGE@LDFLAGS:=$(PACKLDFLAGS) | |
40 | endif | |
41 | ||
810722e6 | 42 | ifndef PACKDCXXFLAGS |
19ca05d1 | 43 | @PACKAGE@DCXXFLAGS:=$(CXXFLAGSNO) |
810722e6 | 44 | else |
117cfc60 | 45 | @PACKAGE@DCXXFLAGS:=$(PACKDCXXFLAGS) |
810722e6 | 46 | endif |
47 | ||
de6c7cfd | 48 | ifndef PACKBLIBS |
49 | @PACKAGE@BLIBS:=$(LIBS) | |
50 | else | |
51 | @PACKAGE@BLIBS:=$(PACKBLIBS) | |
52 | endif | |
53 | ||
f0a26826 | 54 | |
55 | ifdef DHDR | |
56 | WITHDICT=YES | |
57 | else | |
58 | WITHDICT= | |
59 | endif | |
60 | ||
f347de98 | 61 | # Headerfiles exported to common place: |
62 | @PACKAGE@EXPORT:=$(EXPORT) | |
63 | @PACKAGE@EXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT)) | |
64 | ||
65 | ||
67fd7264 | 66 | #Extra include,libs, defines etc. |
67 | ||
2603dcc4 | 68 | @PACKAGE@DEFINE:=$(EDEFINE) -D__MODULE__=\"@MODULE@\" |
f347de98 | 69 | |
70 | @PACKAGE@INC:=$(patsubst %,-I%,$(EINCLUDE)) -I@MODULE@ | |
71 | ||
f0a26826 | 72 | @PACKAGE@ELIBS:=$(patsubst %,-l%,$(ELIBS)) |
87c71321 | 73 | @PACKAGE@ELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS)) |
f0a26826 | 74 | @PACKAGE@ELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR)) |
75 | ||
76 | #c sources and headers | |
77 | ||
78 | @PACKAGE@CS:=$(patsubst %,$(MODDIR)/%,$(CSRCS)) | |
79 | @PACKAGE@CH:=$(patsubst %,$(MODDIR)/%,$(CHDRS)) | |
80 | ||
81 | #Fortran sources | |
82 | @PACKAGE@FS:=$(patsubst %,$(MODDIR)/%,$(FSRCS)) | |
83 | ||
84 | #c++ sources and header | |
85 | @PACKAGE@S:=$(patsubst %,$(MODDIR)/%,$(SRCS)) | |
f347de98 | 86 | @PACKAGE@H:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS) |
87 | ||
88 | ############################################################################# | |
89 | # | |
90 | # If special rootcint headerfiles is specified use them | |
91 | # else use all headers | |
f0a26826 | 92 | |
f347de98 | 93 | ifndef CINTHDRS |
94 | @PACKAGE@CINTHDRS:=$(@PACKAGE@H) | |
95 | else | |
96 | @PACKAGE@CINTHDRS:=$(CINTHDRS) | |
97 | endif | |
98 | ############################################################################# | |
f0a26826 | 99 | |
100 | # Package Dictionary | |
f0a26826 | 101 | @PACKAGE@DH:=$(MODDIR)/$(DHDR) |
102 | ||
f0a26826 | 103 | #All objects |
104 | @PACKAGE@CO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o)) | |
105 | TEMP:=$(FSRCS:.F=.o) | |
106 | @PACKAGE@FO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o)) | |
107 | @PACKAGE@O:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(@PACKAGE@FO) $(@PACKAGE@CO) | |
108 | ||
d47d6108 | 109 | |
110 | ||
f0a26826 | 111 | ifdef WITHDICT |
112 | @PACKAGE@DS:=$(MODDIRO)/G__@PACKAGE@.cxx | |
113 | @PACKAGE@DO:=$(MODDIRO)/G__@PACKAGE@.o | |
114 | @PACKAGE@DDEP:=$(@PACKAGE@DO:.o=.d) | |
115 | @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d) $(@PACKAGE@DDEP) | |
116 | else | |
117 | @PACKAGE@DS:= | |
118 | @PACKAGE@DO:= | |
119 | @PACKAGE@DDEP:= | |
120 | @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d) | |
121 | endif | |
122 | ||
123 | ||
124 | #The actual library file | |
125 | ||
126 | @PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT) | |
40c469d5 | 127 | |
128 | ifneq ($(DYEXT),) | |
129 | @PACKAGE@DLIB:=$(LIBPATH)/lib@PACKAGE@.$(DYEXT) | |
130 | endif | |
131 | ||
2d8cad5a | 132 | @PACKAGE@ALIB:=$(LIBPATH)/lib@PACKAGE@.$(AEXT) |
f0a26826 | 133 | |
d47d6108 | 134 | #Add this to the modules libs |
135 | @MODULE@LIBS += $(@PACKAGE@LIB) | |
2d8cad5a | 136 | @MODULE@ALIBS += $(@PACKAGE@ALIB) |
40c469d5 | 137 | ifneq ($(DYEXT),) |
138 | @MODULE@DLIBS += $(@PACKAGE@DLIB) | |
139 | endif | |
d47d6108 | 140 | |
f0a26826 | 141 | #The actual binary file |
142 | ||
143 | @PACKAGE@BIN:=$(BINPATH)/@PACKAGE@ | |
144 | ||
d47d6108 | 145 | #Add to modules list of binaries |
146 | @MODULE@BINS += $(@PACKAGE@BIN) | |
f0a26826 | 147 | |
f347de98 | 148 | # Use in the main Makefile |
f0a26826 | 149 | |
150 | ifeq ($(TYPE),lib) | |
151 | ALLLIBS += $(@PACKAGE@LIB) | |
2d8cad5a | 152 | ALLALIBS += $(@PACKAGE@ALIB) |
40c469d5 | 153 | ifneq ($(DYEXT),) |
154 | ALLLIBS += $(@PACKAGE@DLIB) | |
155 | endif | |
f0a26826 | 156 | BINLIBS += -l@PACKAGE@ |
157 | else | |
158 | ALLEXECS += $(@PACKAGE@BIN) | |
159 | endif | |
160 | ||
40c469d5 | 161 | ifeq ($(DYEXT),) |
162 | @PACKAGE@LIB := $(@PACKAGE@LIB) | |
163 | else | |
164 | @PACKAGE@LIB := $(@PACKAGE@LIB) | |
165 | endif | |
166 | ||
87c71321 | 167 | # include all dependence files |
f0a26826 | 168 | INCLUDEFILES +=$(@PACKAGE@DEP) |
169 | ||
f347de98 | 170 | EXPORTFILES += $(@PACKAGE@EXPORTDEST) |
f0a26826 | 171 | |
172 | #local rules | |
173 | ||
f347de98 | 174 | #The exportfiles only include if any!! |
175 | ||
176 | ifdef @PACKAGE@EXPORT | |
896cb507 | 177 | #$(@PACKAGE@EXPORTDEST): $(patsubst %,@MODULE@/%,$(@PACKAGE@EXPORT)) |
178 | ||
179 | $(@PACKAGE@EXPORTDEST): $(EXPORTDIR)/%.h: @MODULE@/%.h | |
15142e2f | 180 | ifndef ALIQUIET |
ba419e66 | 181 | @echo "***** Copying file $^ to $@ *****" |
15142e2f | 182 | endif |
53f2641c | 183 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) |
ba419e66 | 184 | @cp $^ $@ |
f347de98 | 185 | endif |
186 | ||
88cb7938 | 187 | #------------------------------------------------------------------------ |
188 | ||
796dbee6 | 189 | ifneq (,$(findstring macosx,$(ALICE_TARGET))) |
f3564e28 | 190 | $(@PACKAGE@LIB): $(@PACKAGE@DLIB) $(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk |
191 | ifndef ALIQUIET | |
192 | @echo "***** Linking library $@ *****" | |
193 | endif | |
194 | $(MUTE)rm -f $@; cd $(dir $@); ln -s $(notdir $(@PACKAGE@DLIB)) $(notdir $@) | |
195 | else | |
f0a26826 | 196 | $(@PACKAGE@LIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk |
15142e2f | 197 | ifndef ALIQUIET |
f0a26826 | 198 | @echo "***** Linking library $@ *****" |
15142e2f | 199 | endif |
faeab8a4 | 200 | $(MUTE)TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; \ |
117cfc60 | 201 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ |
faeab8a4 | 202 | find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ |
043a26ce | 203 | \rm -f $(CURDIR)/$@ ;\ |
7930dd19 | 204 | TMPLIB=$(notdir $(@PACKAGE@LIB)); export TMPLIB;\ |
ce4e6d58 | 205 | $(SHLD) $(@PACKAGE@SOFLAGS) -o $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(SHLIB);\ |
206 | chmod a-w $(CURDIR)/$@ ;\ | |
fe250300 | 207 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR |
f3564e28 | 208 | endif |
810722e6 | 209 | |
40c469d5 | 210 | ifneq ($(DYEXT),) |
211 | $(@PACKAGE@DLIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk | |
212 | ifndef ALIQUIET | |
213 | @echo "***** Linking library $@ *****" | |
214 | endif | |
215 | $(MUTE)TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; \ | |
117cfc60 | 216 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ |
40c469d5 | 217 | find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ |
fe250300 | 218 | \rm -f $(CURDIR)/$@ ;\ |
ce4e6d58 | 219 | $(DYLD) $(@PACKAGE@DYFLAGS) -o $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(DYLIB);\ |
220 | chmod a-w $(CURDIR)/$@ ;\ | |
fe250300 | 221 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR |
40c469d5 | 222 | endif |
223 | ||
88cb7938 | 224 | #------------------------------------------------------------------------ |
225 | ||
2d8cad5a | 226 | $(@PACKAGE@ALIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk |
227 | ifndef ALIQUIET | |
228 | @echo "***** Linking static library $@ *****" | |
229 | endif | |
230 | $(MUTE)TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; \ | |
117cfc60 | 231 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ |
2d8cad5a | 232 | find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ |
7930dd19 | 233 | \rm -f $(CURDIR)/$@ ;\ |
234 | TMPLIB=$(notdir $(@PACKAGE@LIB)); export TMPLIB;\ | |
043a26ce | 235 | $(ALLD) $(ALFLAGS) $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(ALLIB);\ |
236 | cd $(CURDIR) ; \rm -rf $$TMPDIR | |
2d8cad5a | 237 | $(MUTE)chmod a-w $@ |
238 | ||
239 | ||
2603dcc4 | 240 | $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk |
15142e2f | 241 | ifndef ALIQUIET |
242 | @echo "***** Making executable $@ *****" | |
243 | endif | |
2d8cad5a | 244 | ifeq ($(ALIPROFILE),YES) |
de6c7cfd | 245 | $(MUTE)$(LD) $(@PACKAGE@LDFLAGS) $(@PACKAGE@O) $(ARLIBS) $(SHLIBS) $(@PACKAGE@BLIBS) $(EXEFLAGS) -o $@ |
2d8cad5a | 246 | else |
de6c7cfd | 247 | $(MUTE)$(LD) $(@PACKAGE@LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(@PACKAGE@BLIBS) $(EXEFLAGS) -o $@ |
2d8cad5a | 248 | endif |
f0a26826 | 249 | |
de6c7cfd | 250 | $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk @MODULE@/tgt_$(ALICE_TARGET)/@PACKAGE@_srcslist |
15142e2f | 251 | ifndef ALIQUIET |
f0a26826 | 252 | @echo "***** Creating $@ *****"; |
15142e2f | 253 | endif |
f0a26826 | 254 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
043a26ce | 255 | @\rm -f $(patsubst %.cxx,%.d, $@) |
67fd7264 | 256 | $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) |
f0a26826 | 257 | |
62b5f6a4 | 258 | $(@PACKAGE@DO): $(@PACKAGE@DS) |
15142e2f | 259 | ifndef ALIQUIET |
260 | @echo "***** Compiling $< *****"; | |
261 | endif | |
117cfc60 | 262 | $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@DCXXFLAGS) |
f0a26826 | 263 | |
62b5f6a4 | 264 | $(MODDIRO)/@PACKAGE@_srcslist: @MODULE@/@TYPE@@PACKAGE@.pkg |
e7fb9451 | 265 | $(MUTE)if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi |
266 | $(MUTE)for i in $(@PACKAGE@CS) $(@PACKAGE@S) xyz; do echo $$i; done | sort > $@.new | |
6a772515 | 267 | $(MUTE)for j in `diff -w $@ $@.new 2>/dev/null | awk '/^\</{sub(".c.*",".",$$2); print $$2}' | $(XARGS) basename` ;\ |
268 | do grep -l $$j `find */tgt_$(ALICE_TARGET) -name "*.d"` | $(XARGS) echo \rm -f ;\ | |
269 | (find @MODULE@/tgt_$(ALICE_TARGET) -name "$${j}d" ; find @MODULE@/tgt_$(ALICE_TARGET) -name "$${j}o") | $(XARGS) echo \rm -f ;\ | |
62b5f6a4 | 270 | done |
e7fb9451 | 271 | $(MUTE)diff -q -w >/dev/null 2>&1 $@ $@.new ;\ |
62b5f6a4 | 272 | if [ $$? -ne 0 ]; then \mv $@.new $@; else \rm $@.new; fi |
de6c7cfd | 273 | |
f0a26826 | 274 | #Different targets for the module |
275 | ||
5edd655b | 276 | ifeq ($(TYPE),lib) |
5864aa62 | 277 | all-@PACKAGE@: $(@PACKAGE@LIB) |
40c469d5 | 278 | ifneq ($(DYEXT),) |
279 | all-@PACKAGE@: $(@PACKAGE@DLIB) | |
280 | endif | |
5edd655b | 281 | else |
282 | all-@PACKAGE@: $(@PACKAGE@BIN) | |
283 | endif | |
284 | ||
f0a26826 | 285 | depend-@PACKAGE@: $(@PACKAGE@DEP) |
286 | ||
287 | # determination of object files | |
288 | $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d | |
15142e2f | 289 | ifndef ALIQUIET |
290 | @echo "***** Compiling $< *****"; | |
291 | endif | |
f0a26826 | 292 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
67fd7264 | 293 | $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS) |
f0a26826 | 294 | |
295 | $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d | |
15142e2f | 296 | ifndef ALIQUIET |
297 | @echo "***** Compiling $< *****"; | |
298 | endif | |
f0a26826 | 299 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
15142e2f | 300 | $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS) |
f0a26826 | 301 | |
302 | $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d | |
15142e2f | 303 | ifndef ALIQUIET |
304 | @echo "***** Compiling $< *****"; | |
305 | endif | |
f0a26826 | 306 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
15142e2f | 307 | $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS) |
f0a26826 | 308 | |
309 | $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d | |
15142e2f | 310 | ifndef ALIQUIET |
311 | @echo "***** Compiling $< *****"; | |
312 | endif | |
f0a26826 | 313 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
67fd7264 | 314 | $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS) |
f0a26826 | 315 | |
316 | $(@PACKAGE@DDEP): $(@PACKAGE@DS) | |
15142e2f | 317 | ifndef ALIQUIET |
87c71321 | 318 | @echo "***** Making dependences for $< *****"; |
15142e2f | 319 | endif |
f0a26826 | 320 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
321 | @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ | |
322 | ||
d47d6108 | 323 | $(MODDIRO)/%.d: $(MODDIRS)/%.cxx |
15142e2f | 324 | ifndef ALIQUIET |
87c71321 | 325 | @echo "***** Making dependences for $< *****"; |
15142e2f | 326 | endif |
f0a26826 | 327 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
67fd7264 | 328 | @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ |
896cb507 | 329 | $(MODDIRO)/%.d: $(MODDIRS)/%.f |
15142e2f | 330 | ifndef ALIQUIET |
87c71321 | 331 | @echo "***** Making dependences for $< *****"; |
15142e2f | 332 | endif |
f0a26826 | 333 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
896cb507 | 334 | @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ |
335 | $(MODDIRO)/%.d: $(MODDIRS)/%.F | |
15142e2f | 336 | ifndef ALIQUIET |
87c71321 | 337 | @echo "***** Making dependences for $< *****"; |
15142e2f | 338 | endif |
f0a26826 | 339 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
15142e2f | 340 | $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ |
896cb507 | 341 | $(MODDIRO)/%.d: $(MODDIRS)/%.c |
15142e2f | 342 | ifndef ALIQUIET |
87c71321 | 343 | @echo "***** Making dependences for $< *****"; |
15142e2f | 344 | endif |
f0a26826 | 345 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) |
67fd7264 | 346 | @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ |
b9d0a01d | 347 | |
bdfb9593 | 348 | .PRECIOUS: $(patsubst %.cxx,$(MODDIRO)/%.d,$(SRCS)) |
349 | .PRECIOUS: $(patsubst %.c,$(MODDIRO)/%.d,$(CSRCS)) | |
350 | .PRECIOUS: $(patsubst %.F,$(MODDIRO)/%.d,$(patsubst %.f,$(MODDIRO)/%.d,$(FSRCS))) | |
814cac0f | 351 | |
7e96fcc7 | 352 | @PACKAGE@CHECKS := $(patsubst %.cxx,@MODULE@/check/%.viol,$(SRCS)) |
b9d0a01d | 353 | |
7e96fcc7 | 354 | check-@MODULE@: $(@PACKAGE@CHECKS) |
b9d0a01d | 355 | |
356 | # IRST coding rule check | |
62b5f6a4 | 357 | @MODULE@/check/%.i : @MODULE@/%.cxx @MODULE@/tgt_$(ALICE_TARGET)/%.d |
b9d0a01d | 358 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) |
f684a380 | 359 | $(MUTE)$(CXX) -E $(@PACKAGE@DEFINE) $(@PACKAGE@INC) -I. $< > $@ $(@PACKAGE@CXXFLAGS) |
b9d0a01d | 360 | @cd $(dir $@) ; $(IRST_INSTALLDIR)/patch/patch4alice.prl $(notdir $@) |
361 | ||
362 | # IRST coding rule check | |
7e96fcc7 | 363 | @MODULE@/check/%.viol : @MODULE@/check/%.i |
8faf5ae4 | 364 | $(MUTE)echo $@ ; $(CODE_CHECK) $< $(shell echo $(dir $<) | sed -e 's:/check::') > $@ |
b9d0a01d | 365 | |
366 | @PACKAGE@PREPROC = $(patsubst %.viol,%.i,$(@PACKAGE@CHECKS)) | |
367 | ||
368 | @PACKAGE@REVENGS = $(patsubst %.viol,%.ii,$(@PACKAGE@CHECKS)) | |
369 | ||
370 | .SECONDARY: $(@PACKAGE@REVENGS) $(@PACKAGE@PREPROC) | |
371 | ||
c4b5b7b8 | 372 | PACKREVENG += $(@PACKAGE@PREPROC) |
b9d0a01d | 373 |