75ec0f41 |
1 | |
2 | ROOTCINT = rootcint |
3 | ROOTLIBS = $(shell root-config --glibs) -lEG |
4 | ROOTCFLAGS = $(shell root-config --cflags) |
5 | |
6 | # |
7 | # Compile variables |
8 | # |
9 | LIBS = $(ROOTLIBS) |
10 | CPPFLAGS = $(ROOTCFLAGS) -I./ |
11 | |
12 | CXX = g++ |
13 | CXXFLAGS = -c -g -Wall -fPIC |
14 | LD = g++ |
15 | LDFLAGS = -rdynamic -Wl,-rpath,./ $(LIBS) -o |
16 | SOFLAGS = -shared -Wl,-soname, |
17 | CP = cp |
18 | |
19 | LIB = libdNdEta.so |
20 | LIBO = dNdEtaAnalysis.o \ |
21 | dNdEtaAnalysisCint.o \ |
22 | dNdEtaCorrection.o \ |
23 | dNdEtaCorrectionCint.o |
24 | |
25 | # |
26 | # Rules |
27 | |
28 | %Cint.cxx:%.h |
29 | rootcint -f $@ -c $(ROOTCFLAGS) $(CPPFLAGS) -p -I./ $^ |
30 | |
31 | %.o:%.cxx |
32 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $< |
33 | |
34 | %.so: |
35 | $(LD) $(SOFLAGS)$@ $^ -o $@ |
36 | |
37 | %:%.o |
38 | $(LD) $(LDFLAGS) $(LIBS) $^ -o $@ |
39 | |
40 | |
41 | |
42 | # |
43 | # |
44 | #---------------------------------------------------------------------------- |
45 | |
46 | |
47 | LIBRARIES = $(LIB) |
48 | |
49 | # |
50 | # Targets |
51 | # |
52 | .PHONY:all module |
53 | |
54 | all : $(LIBRARIES) |
55 | |
56 | clean: |
57 | @echo "Cleaning up ..." |
58 | @$(RM) -f *~ core *Cint.* *.o |
59 | |
60 | realclean: clean |
61 | @echo "Being very tidy ... " |
62 | @$(RM) -f $(LIBRARIES)* |
63 | @echo "done" |
64 | |
65 | |
66 | # |
67 | # Dependencies |
68 | # |
69 | $(LIB):$(LIBO) |
70 | |
71 | |
72 | |