update config objects for MultiplicityCorrelations
[u/mrichter/AliRoot.git] / CORRFW / Makefile
CommitLineData
563113d0 1
2include Makefile.arch
3
4default-target: libCORRFW.so
5
6ALICEINC = -I.
7
8# add include paths from other par files
9ifneq ($(STEERBase_INCLUDE),)
10 ALICEINC += -I../$(STEERBase_INCLUDE)
11endif
12
13ifneq ($(ESD_INCLUDE),)
14 ALICEINC += -I../$(ESD_INCLUDE)
15endif
16
17ifneq ($(AOD_INCLUDE),)
18 ALICEINC += -I../$(AOD_INCLUDE)
19endif
20
21ifneq ($(ANALYSIS_INCLUDE),)
22 ALICEINC += -I../$(ANALYSIS_INCLUDE)
23endif
24
ac8a9aba 25ifneq ($(ANALYSISalice_INCLUDE),)
26ALICEINC += -I../$(ANALYSISalice_INCLUDE)
27endif
563113d0 28
29# only if no par file was loaded before
30ifeq ($(ALICEINC),-I.)
31 ifneq ($(ALICE_ROOT),)
32 ALICEINC += -I$(ALICE_ROOT)/include
33 endif
34endif
35
36CXXFLAGS += $(ALICEINC) -g
37
38PACKAGE = CORRFW
84d4333f 39
958d9d26 40SRCS = $(wildcard *.cxx)
41HDRS = $(SRCS:.cxx=.h)
42DHDR = $(PACKAGE)LinkDef.h
563113d0 43
44DHDR_CORRFW := $(DHDR)
45HDRS_CORRFW := $(HDRS)
46SRCS_CORRFW := $(SRCS) G__$(PACKAGE).cxx
47OBJS_CORRFW := $(SRCS_CORRFW:.cxx=.o)
48
49PARFILE = $(PACKAGE).par
50
51
52lib$(PACKAGE).so: $(OBJS_CORRFW)
53 @echo "Linking" $@ ...
54 @/bin/rm -f $@
d86acb69 55ifeq ($(PLATFORM),macosx)
56# We need to make both the .dylib and the .so
57 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
58ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
59ifeq ($(MACOSX_MINOR),4)
60 ln -sf $@ $(subst .$(DllSuf),.so,$@)
563113d0 61else
d86acb69 62 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
63 $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
64endif
65endif
66else
67ifeq ($(PLATFORM),win32)
68 bindexplib $* $^ > $*.def
69 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
70 $(OutPutOpt)$(EVENTLIB)
71 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
72 $(OutPutOpt)$@
73else
74 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
75endif
563113d0 76endif
77 @chmod a+x $@
78 @echo "done"
79
80%.o: %.cxx %.h
81 $(CXX) $(CXXFLAGS) $(PACKCXXFLAGS) -c $< -o $@
82
83clean:
84 @rm -f $(OBJS_CORRFW) *.so G__$(PACKAGE).* $(PARFILE)
85
86G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
87 @echo "Generating dictionary ..."
88 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
89
90### CREATE PAR FILE
91
84d4333f 92$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_CORRFW) $(SRCS_CORRFW) $(DHDR_CORRFW) Makefile Makefile.arch PROOF-INF))
563113d0 93 @echo "Creating archive" $@ ...
94 @tar cfzh $@ $(PACKAGE)
95 @rm -rf $(PACKAGE)
96 @echo "done"
97
98$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
99 @echo Copying $< to $@ with transformations
100 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
101 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
102
103$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
104 @echo Copying $< to $@
105 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
106 @cp -a $^ $@
107
108$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
109 @echo Copying $< to $@
110 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
111 @cp -a -r $^ $@
112
113$(PACKAGE)/%: %
114 @echo Copying $< to $@
115 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
116 @cp -a $< $@
117
118test-%.par: %.par
119 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
120 @mkdir -p par-tmp
121 @cd par-tmp; tar xfz ../$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
122 @rm -rf par-tmp
123 @echo "INFO: Testing succeeded (already cleaned up)"