source: Idarraga/mpxdataconverter/Makefile

Last change on this file was 263, checked in by idarraga, 12 years ago
  • Property svn:executable set to *
File size: 3.3 KB
Line 
1#GLOBAL_CFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
2#GLOBAL_CFLAGS= `getconf LFS_CFLAGS`
3GLOBAL_LDFLAGS= `getconf LFS_LDFLAGS`
4INCLUDE=
5IBS=
6OBJS = allpix_dm.o listHandler.o MediPixWriteToEntuple.o SelDict.o
7SRCS = allpix_dm.cc listHandler.cpp MediPixWriteToEntuple.cc
8HDRS = allpix_dm.h listHandler.h MediPixWriteToEntuple.h allpix_dm_consts.h
9
10ifndef ROOTSYS
11  DO_FLAG=FALSE 
12else
13  DO_FLAG=TRUE
14  INCLUDE += $(shell $(ROOTSYS)/bin/root-config --prefix=$(ROOTSYS) --cflags)
15  LIBS += $(shell $(ROOTSYS)/bin/root-config --prefix=$(ROOTSYS) --libs)
16endif
17
18GLOBAL_CFLAGS=-g3 -W -Wall
19PROGNAME=mpxdataconverter
20
21all:    $(PROGNAME) raw_to_pixeldm binary_multiframe
22        @echo "[DONE]"
23ifeq ($(DO_FLAG),FALSE)
24        @echo "ROOTSYS variable should by set to run make command"
25else
26        @rm -f check_file
27        @rm -f touch_file
28        @make $(PROGNAME)
29endif
30        @echo ""
31
32########################################
33
34$(PROGNAME):    msg1 MediPixROOTConverter.o ${OBJS}
35        g++ -o $@ MediPixROOTConverter.o ${OBJS} ${LIBS}
36
37msg1:   
38        @echo "----------------------------------------------------"
39        @echo "             Building converter: Pixelman to MAFalda"
40        @echo "                                 John Idarraga, 2008"
41        @echo "                                    idarraga@cern.ch"
42        @echo "----------------------------------------------------"
43
44########################################
45
46raw_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
50binary_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
54msg2:   
55        @echo "----------------------------------------------------"
56        @echo "            Building converter: USBPixRaw to MAFalda"
57        @echo "                                 John Idarraga, 2011"
58        @echo "                                    idarraga@cern.ch"
59        @echo "----------------------------------------------------"   
60
61msg3:   
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
71MediPixROOTConverter.o: MediPixROOTConverter.cpp
72        g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c MediPixROOTConverter.cpp
73
74allpix_dm.o:    allpix_dm.cc
75        g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c allpix_dm.cc
76
77listHandler.o:  listHandler.cpp
78        g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c listHandler.cpp
79
80control.o:      control.cpp
81        g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c control.cpp
82
83MediPixWriteToEntuple.o:        MediPixWriteToEntuple.cc
84        g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c MediPixWriteToEntuple.cc
85
86drawProperties.o:       drawProperties.cpp
87        g++ $(GLOBAL_CFLAGS) $(INCLUDE) -c drawProperties.cpp
88
89SelDict.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
94clean:
95        @rm -f *.o MediPixViewer MediPixROOTConverter
Note: See TracBrowser for help on using the repository browser.