]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/Makefile
Fixes for cmake
[u/mrichter/AliRoot.git] / PHOS / Makefile
1 PACKAGE = invalid-only-for-proof
2
3 include $(ROOTSYS)/test/Makefile.arch
4 include lib$(PACKAGE).pkg
5
6 ifndef PACKCXXFLAGS
7    PACKCXXFLAGS = $(CXXFLAGS)
8 endif
9
10 ALICEINC = -I.
11
12 ### define include dir for local case and par case
13
14
15 # only if no par file was loaded before
16 ifeq ($(ALICEINC),-I.)
17   ifneq ($(ALICE_ROOT),)
18     ALICEINC += -I$(ALICE_ROOT)/include
19   endif
20 endif
21
22 CXXFLAGS += $(ALICEINC) -g
23
24 SRCS         += G__$(PACKAGE).cxx
25 OBJS          = $(SRCS:.cxx=.o)
26
27 lib$(PACKAGE).so: $(OBJS)
28         @echo "Linking" $@ ...
29         @/bin/rm -f $@
30 ifeq ($(ARCH),macosx)
31         @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
32 else
33         @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
34 endif
35         @chmod a+x $@
36         @echo "done"
37
38 %.o:    %.cxx %.h
39         $(CXX) $(PACKCXXFLAGS) -c $< -o $@
40
41 clean:
42         @rm -f $(OBJS) *.so G__$(PACKAGE).*
43
44 G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
45         @echo "Generating dictionaries ..." $(ALICEINC)
46         rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
47