Double check if SM is running added. Some redundant output removed from SM
[u/mrichter/AliRoot.git] / TTherminator / Makefile
CommitLineData
2e967919 1# $Id$
2
41f671ab 3include Makefile.arch
2e967919 4
5default-target: libTTherminator.so
6
7ALICEINC = -I. -I$(ALICE_ROOT)/include -ITherminator
8
9### define include dir for local case and par case
10ifneq ($(ALICE_ROOT),)
11 ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PYTHIA6 -I$(ALICE_ROOT)/EVGEN -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/TPC
12else
13 ifneq ($(STEERBase_INCLUDE),)
14 ALICEINC += -I../$(STEERBase_INCLUDE)
15 endif
16 ifneq ($(ESD_INCLUDE),)
17 ALICEINC += -I../$(ESD_INCLUDE)
18 endif
19endif
20
21PACKAGE = TTherminator
2e967919 22
958d9d26 23DHDR =
24HDRS =
25SRCS =
26FSRCS =
2e967919 27DHDR_TTherminator := $(DHDR)
28HDRS_TTherminator := $(HDRS)
29SRCS_TTherminator := $(SRCS) G__$(PACKAGE).cxx
30OBJS_TTherminator := $(SRCS_TTherminator:.cxx=.o)
31
32PARFILE = $(PACKAGE).par
33
34lib$(PACKAGE).so: $(OBJS_TTherminator)
35 @echo "Linking" $@ ...
36 @/bin/rm -f $@
41f671ab 37 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
2e967919 38 @chmod a+x $@
39 @echo "done"
40
41%.o: %.cxx %.h
42 $(CXX) $(CXXFLAGS) -c $< -o $@ $(ALICEINC)
43
44G__TTherminator.cxx G__TTherminator.h: $(HDRS_TTherminator) $(DHDR_TTherminator)
45 @echo "Generating dictionary ..."
46 rootcint -f $@ -c $(ALICEINC) $^
47
48clean:
49 @rm -f $(OBJS_TTherminator) *.so G__TTherminator.* $(PARFILE)
50
51### CREATE PAR FILE
52
53$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_TTherminator) $(SRCS_TTherminator) $(DHDR_TTherminator) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
54 @echo "Creating archive" $@ ...
55 @tar cfzh $@ $(PACKAGE)
56 @rm -rf $(PACKAGE)
57 @echo "done"
58
59$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
60 @echo Copying $< to $@ with transformations
61 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
62 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
63
64$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
65 @echo Copying $< to $@
66 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
67 @cp -a $^ $@
68
69$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
70 @echo Copying $< to $@
71 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
72 @cp -a -r $^ $@
73
74$(PACKAGE)/%: %
75 @echo Copying $< to $@
76 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
77 @cp -a $< $@
78
79test-%.par: %.par
80 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
81 @mkdir -p par-tmp
82 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
83 @rm -rf par-tmp
84 @echo "INFO: Testing succeeded (already cleaned up)"
85