Correction for bug #77355: Generation of PARs
[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
16ifneq ($(OADB_INCLUDE),)
17 ALICEINC += -I../$(OADB_INCLUDE)
18endif
19
20# only if no par file was loaded before
21ifeq ($(ALICEINC),-I.)
22 ifneq ($(ALICE_ROOT),)
23 ALICEINC += -I$(ALICE_ROOT)/include
24 endif
25endif
26
27
28
29
30CXXFLAGS += $(ALICEINC) -g
31
32SRCS += G__$(PACKAGE).cxx
33OBJS = $(SRCS:.cxx=.o)
34
35lib$(PACKAGE).so: $(OBJS)
36 @echo "Linking" $@ ...
37 @/bin/rm -f $@
38ifeq ($(ARCH),macosx)
39 @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
40else
41 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
42endif
43 @chmod a+x $@
44 @echo "done"
45
46%.o: %.cxx %.h
47 $(CXX) $(PACKCXXFLAGS) -c $< -o $@
48
49clean:
50 @rm -f $(OBJS) *.so G__$(PACKAGE).*
51
52G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
53 @echo "Generating dictionaries ..." $(ALICEINC)
54 rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
55