/[PAMELA software]/gp2root/Makefile
ViewVC logotype

Diff of /gp2root/Makefile

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

revision 1.1 by pamela, Wed Apr 19 23:35:58 2006 UTC revision 1.2 by cafagna, Sun Oct 22 08:26:35 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    pAllEventDict.cxx: pEvent.h pDetector.h pHit.h pHeader.h pAllEventLinkDef.h
61            rootcint -f $@ -c $^
62    
63    gp2root:  gp2root.o pAllEventDict.o ${OBJS} ${DICO}
64            $(LD) $(LDFLAGS) -o $@ $^ ${ROOTLIBS} ${CERNLIBS} ${F77LIBS} ${SYSLIBS}
65    
66    depend: ${DEPS}
67    
68    %.d: %.cpp
69            @echo Creating dependencies for $<
70            @$(CXX) -MM $(CXXFLAGS) $< -o $@
71    
72    -include ${DEPS}
73    
74    .SUFFIXES: .cxx
75    .cxx.o:
76            $(CXX) $(CXXFLAGS) -c $< `root-config --cflags`
77    
78    
79    .PHONY: clean
80    
81    clean:
82            @echo Removing object files .....
83            @rm -f ${OBJS} ${DICO}
84            @echo Removing dependencies files .....
85            @rm -f ${DEPS}
86            @echo Removing dictionary files .....
87            @rm -f ${JUNK} ${DICH}
88            @echo Removing temporary files .....
89            @rm -f ${JUNK}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23