1 |
SHELL = /bin/sh |
2 |
# decide on compiler and flags depending on host |
3 |
CC = g++ |
4 |
CFLAGS=-fPIC -pthread |
5 |
ALL_CFLAGS = -Wall -O6 $(CFLAGS) -m32 |
6 |
|
7 |
LIBS = -L$(PAM_LIB)/ -lyoda -lDarthVader -lPamLevel2 -lCaloLevel2 -lTrkLevel2 -lTrkProcess -lTrkVerl2 -lPamCut -lCaloAxis -L$(PAM_PA_LIB)/ -lPa `root-config --cflags --glibs` -L$(ROOTSYS)/ -lTMVA -lMinuit -lXMLIO -lXMLParser -lMLP -lTreePlayer |
8 |
|
9 |
INCS = -I `root-config --incdir` -I$(PAM_INC)/ -I$(PAM_INC)/PamCut/ -I$(PAM_PA_INC)/ -I$(PAM_INC)/yoda/ -I./ |
10 |
|
11 |
CROOT= root -l -b -q |
12 |
|
13 |
# pattern rule to compile object files from C files |
14 |
# might not work with make programs other than GNU make |
15 |
#%.o : %.cpp Makefile |
16 |
# $(CC) $(ALL_CFLAGS) $(INCS) -c $< -o $@ |
17 |
|
18 |
all: clean lib mask_profiler |
19 |
|
20 |
mask_profiler: mask_profiler.o VKmask_cpp.so Makefile |
21 |
$(CC) $(ALL_CFLAGS) $(INCS) mask_profiler.o $(LIBS) -L$(PAM_CUT)/ -lPamCut ./VKmask_cpp.so -o mask_profiler |
22 |
|
23 |
|
24 |
mask_profiler.o : mask_profiler.cpp Makefile |
25 |
$(CC) $(ALL_CFLAGS) $(INCS) -c $< -o $@ |
26 |
|
27 |
lib: MakeLib.C VKmask.cpp VKmask.h |
28 |
$(CROOT) MakeLib.C |
29 |
install: |
30 |
cp mask_profiler $(PAM_BIN)/ |
31 |
cp VKmask.h $(PAM_INC)/ |
32 |
cp VKmask_cpp.so $(PAM_LIB)/ |
33 |
|
34 |
.PHONY : clean |
35 |
clean: |
36 |
rm -f *.o mask_profiler |
37 |
rm -f *.o |
38 |
rm -f *~ |
39 |
rm -f *.so |