/[PAMELA software]/gp2root/Makefile
ViewVC logotype

Diff of /gp2root/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by pamela, Wed Apr 19 23:35:58 2006 UTC revision 1.3 by cafagna, Sun Oct 22 08:56:17 2006 UTC
# Line 1  Line 1 
1  testcashit: testcashit.cpp pUtil.o pPhitMgr.o pPdetMgr.o  # Compilers settings
2    ROOTCFLAGS  =`root-config --cflags`
3    ROOTLDFLAGS =`root-config --ldflags`
4    ROOTLIBS    =`root-config --libs` -lHbook
5    CERNLIBS    =`cernlib kernlib,packlib,genlib`
6    F77LIBS     =-lg2c -lnsl
7    SYSLIBS     =-lm -ldl -rdynamic
8    LD          =g++
9    CXXFLAGS=-g -O -Wall -fPIC ${ROOTCFLAGS}
10    #CXXFLAGS= -g -Wall -O ${ROOTCFLAGS}
11    LDFLAGS = -g
12    
13    DICS = pCasID.cpp pHeaderID.cpp pTof.cpp pCat.cpp \
14            pTofHit.cpp pCal.cpp pCatHit.cpp pHitID.cpp pTofID.cpp \
15            pCalHit.cpp pCatID.cpp pNdID.cpp pTrdID.cpp \
16            pCalID.cpp pCaliID.cpp \
17            pCas.cpp pCasHit.cpp pSpeID.cpp
18    
19    MGRS = pPheaMgr.cpp pPhitMgr.cpp pPdetMgr.cpp
20    UTIL = pUtils.cpp pBlockPointer.cpp  
21    
22    SRCS = pCasID.cpp pHeaderID.cpp pTof.cpp pCat.cpp pHit.cpp \
23            pTofHit.cpp pCal.cpp pCatHit.cpp pHitID.cpp pTofID.cpp \
24            pCalHit.cpp pCatID.cpp pNdID.cpp pTrdID.cpp \
25            pCalID.cpp pDetector.cpp pCaliID.cpp pEvent.cpp \
26            pCas.cpp pCasHit.cpp pHeader.cpp pSpeID.cpp \
27            pPheaMgr.cpp pPhitMgr.cpp pPdetMgr.cpp \
28            pUtils.cpp pBlockPointer.cpp  
29    
30    HEAS =$(SRCS:.cpp=.h)
31    OBJS =$(SRCS:.cpp=.o)
32    DEPS =$(SRCS:.cpp=.d)
33    CLAS =$(DICS:.cpp= )
34    CLASH=$(DICS:.cpp=.h)
35    JUNK =$(addsuffix ~,${SRCS}) $(addsuffix ~,${HEAS})
36    DICO =$(addsuffix Dict.o, ${CLAS})
37    DICH =$(addsuffix Dict.h, ${CLAS})
38    
39    
40    testcashit: testcashit.o pAllEventDict.o ${OBJS} ${DICO}
41            $(LD) $(LDFLAGS) -o $@ $^ ${ROOTLIBS}
42    
43    
44    libpEvent.so: LDFLAGS=-O `root-config --ldflags`
45    libpEvent.so: SOFLAGS=-shared
46    libpEvent.so: pAllEventDict.o ${OBJS} ${DICO}
47            $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
48    
49    %Dict.cxx: %.h %LinkDef.h
50            rootcint -f $@ -c $^
51    
52    %Dict.o: %Dict.cxx
53    
54    %LinkDef.h:
55            @echo "#pragma link off all class;" > $@
56            @echo "#pragma link off all function;" >> $@
57            @echo "#pragma link off all global;" >> $@
58            @echo "#pragma link C++ class `echo $@ | sed 's/LinkDef.h//'`;" >> $@
59    
60    pAllEventLinkDef.h: pEvent.h pDetector.h pHit.h pHeader.h
61            @echo "#pragma link off all class;" > $@
62            @echo "#pragma link off all function;" >> $@
63            @echo "#pragma link off all global;" >> $@
64            @for i in $^; do \
65                    echo "#pragma link C++ class `echo "$$i" | sed 's/.h//'`;" >> $@;\
66             done
67    
68    
69    pAllEventDict.cxx: pEvent.h pDetector.h pHit.h pHeader.h pAllEventLinkDef.h
70            rootcint -f $@ -c $^
71    
72    gp2root:  gp2root.o pAllEventDict.o ${OBJS} ${DICO}
73            $(LD) $(LDFLAGS) -o $@ $^ ${ROOTLIBS} ${CERNLIBS} ${F77LIBS} ${SYSLIBS}
74    
75    depend: ${DEPS}
76    
77    %.d: %.cpp
78            @echo Creating dependencies for $<
79            @$(CXX) -MM $(CXXFLAGS) $< -o $@
80    
81    -include ${DEPS}
82    
83    .SUFFIXES: .cxx
84    .cxx.o:
85            $(CXX) $(CXXFLAGS) -c $< `root-config --cflags`
86    
87    
88    .PHONY: clean
89    
90    clean:
91            @echo Removing object files .....
92            @rm -f ${OBJS} ${DICO}
93            @echo Removing dependencies files .....
94            @rm -f ${DEPS}
95            @echo Removing dictionary files .....
96            @rm -f ${JUNK} ${DICH}
97            @echo Removing temporary files .....
98            @rm -f ${JUNK}

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23