1 | #GLOBAL_CFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
---|
2 | #GLOBAL_CFLAGS= `getconf LFS_CFLAGS` |
---|
3 | GLOBAL_LDFLAGS= `getconf LFS_LDFLAGS` |
---|
4 | INCLUDE= |
---|
5 | IBS= |
---|
6 | OBJS = allpix_dm.o listHandler.o MediPixWriteToEntuple.o SelDict.o |
---|
7 | SRCS = allpix_dm.cc listHandler.cpp MediPixWriteToEntuple.cc |
---|
8 | HDRS = allpix_dm.h listHandler.h MediPixWriteToEntuple.h allpix_dm_consts.h |
---|
9 | |
---|
10 | ifndef ROOTSYS |
---|
11 | DO_FLAG=FALSE |
---|
12 | else |
---|
13 | DO_FLAG=TRUE |
---|
14 | INCLUDE += $(shell $(ROOTSYS)/bin/root-config --prefix=$(ROOTSYS) --cflags) |
---|
15 | LIBS += $(shell $(ROOTSYS)/bin/root-config --prefix=$(ROOTSYS) --libs) |
---|
16 | endif |
---|
17 | |
---|
18 | GLOBAL_CFLAGS=-g3 -W -Wall |
---|
19 | PROGNAME=mpxdataconverter |
---|
20 | |
---|
21 | all: $(PROGNAME) raw_to_pixeldm binary_multiframe |
---|
22 | @echo "[DONE]" |
---|
23 | ifeq ($(DO_FLAG),FALSE) |
---|
24 | @echo "ROOTSYS variable should by set to run make command" |
---|
25 | else |
---|
26 | @rm -f check_file |
---|
27 | @rm -f touch_file |
---|
28 | @make $(PROGNAME) |
---|
29 | endif |
---|
30 | @echo "" |
---|
31 | |
---|
32 | ######################################## |
---|
33 | |
---|
34 | $(PROGNAME): msg1 MediPixROOTConverter.o ${OBJS} |
---|
35 | g++ -o $@ MediPixROOTConverter.o ${OBJS} ${LIBS} |
---|
36 | |
---|
37 | msg1: |
---|
38 | @echo "----------------------------------------------------" |
---|
39 | @echo " Building converter: Pixelman to MAFalda" |
---|
40 | @echo " John Idarraga, 2008" |
---|
41 | @echo " idarraga@cern.ch" |
---|
42 | @echo "----------------------------------------------------" |
---|
43 | |
---|
44 | ######################################## |
---|
45 | |
---|
46 | raw_to_pixeldm: msg2 allpix_dm.o MediPixWriteToEntuple.o SelDict.o raw_to_pixeldm.cpp |
---|
47 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c raw_to_pixeldm.cpp |
---|
48 | g++ -o $@ raw_to_pixeldm.o allpix_dm.o MediPixWriteToEntuple.o SelDict.o $(GLOBAL_CFLAGS) $(INCLUDE) ${LIBS} |
---|
49 | |
---|
50 | binary_multiframe: msg3 SelDict.o allpix_dm.o MediPixWriteToEntuple.o binary_multiframe.cpp |
---|
51 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c binary_multiframe.cpp |
---|
52 | g++ -o $@ binary_multiframe.o allpix_dm.o MediPixWriteToEntuple.o SelDict.o $(GLOBAL_CFLAGS) $(INCLUDE) ${LIBS} |
---|
53 | |
---|
54 | msg2: |
---|
55 | @echo "----------------------------------------------------" |
---|
56 | @echo " Building converter: USBPixRaw to MAFalda" |
---|
57 | @echo " John Idarraga, 2011" |
---|
58 | @echo " idarraga@cern.ch" |
---|
59 | @echo "----------------------------------------------------" |
---|
60 | |
---|
61 | msg3: |
---|
62 | @echo "-------------------------------------------------------" |
---|
63 | @echo " Building converter: Pixelman bin-multiframe to MAFalda" |
---|
64 | @echo " John Idarraga, 2011" |
---|
65 | @echo " idarraga@cern.ch" |
---|
66 | @echo "-------------------------------------------------------" |
---|
67 | |
---|
68 | |
---|
69 | ######################################### |
---|
70 | |
---|
71 | MediPixROOTConverter.o: MediPixROOTConverter.cpp |
---|
72 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c MediPixROOTConverter.cpp |
---|
73 | |
---|
74 | allpix_dm.o: allpix_dm.cc |
---|
75 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c allpix_dm.cc |
---|
76 | |
---|
77 | listHandler.o: listHandler.cpp |
---|
78 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c listHandler.cpp |
---|
79 | |
---|
80 | control.o: control.cpp |
---|
81 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c control.cpp |
---|
82 | |
---|
83 | MediPixWriteToEntuple.o: MediPixWriteToEntuple.cc |
---|
84 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c MediPixWriteToEntuple.cc |
---|
85 | |
---|
86 | drawProperties.o: drawProperties.cpp |
---|
87 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c drawProperties.cpp |
---|
88 | |
---|
89 | SelDict.o: |
---|
90 | @echo "Generating dictionary $@..." |
---|
91 | @rootcint -f SelDict.cpp -c MediPixWriteToEntuple.h allpix_dm.h LinkDef.h |
---|
92 | g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c SelDict.cpp |
---|
93 | |
---|
94 | clean: |
---|
95 | @rm -f *.o MediPixViewer MediPixROOTConverter |
---|