Optimisation
[u/mrichter/AliRoot.git] / OADB / Makefile
CommitLineData
1297834e 1PACKAGE = invalid-only-for-proof
2
3include $(ROOTSYS)/test/Makefile.arch
4
958d9d26 5SRCS = $(wildcard *.cxx */*.cxx)
6HDRS = $(SRCS:.cxx=.h)
7DHDR = $(PACKAGE)LinkDef.h
1297834e 8
9
10ifndef PACKCXXFLAGS
11 PACKCXXFLAGS = $(CXXFLAGS)
12endif
13
14ALICEINC = -I.
15
a18817ac 16ifneq ($(STEERBase_INCLUDE),)
17 ALICEINC += -I../$(STEERBase_INCLUDE)
18endif
19
1297834e 20ifneq ($(OADB_INCLUDE),)
21 ALICEINC += -I../$(OADB_INCLUDE)
22endif
23
24# only if no par file was loaded before
25ifeq ($(ALICEINC),-I.)
26 ifneq ($(ALICE_ROOT),)
27 ALICEINC += -I$(ALICE_ROOT)/include
28 endif
29endif
30
31
32
33
34CXXFLAGS += $(ALICEINC) -g
35
36SRCS += G__$(PACKAGE).cxx
37OBJS = $(SRCS:.cxx=.o)
38
39lib$(PACKAGE).so: $(OBJS)
40 @echo "Linking" $@ ...
41 @/bin/rm -f $@
42ifeq ($(ARCH),macosx)
43 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
44else
45 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
46endif
47 @chmod a+x $@
48 @echo "done"
49
50%.o: %.cxx %.h
51 $(CXX) $(PACKCXXFLAGS) -c $< -o $@
52
53clean:
54 @rm -f $(OBJS) *.so G__$(PACKAGE).*
55
56G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
57 @echo "Generating dictionaries ..." $(ALICEINC)
58 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
59