/[PAMELA software]/PamelaDigitizer/Makefile
ViewVC logotype

Diff of /PamelaDigitizer/Makefile

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

revision 1.9 by mocchiut, Tue Sep 23 07:26:52 2008 UTC revision 1.11 by mocchiut, Thu Sep 25 08:49:42 2008 UTC
# Line 37  F77=g77 Line 37  F77=g77
37  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT}  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT}
38  # C++  # C++
39  CXX=g++  CXX=g++
 CXXFLAGS=-Wall -O -fPIC -pthread ${PAM_BIT}  
40  # ROOTCINT  # ROOTCINT
41  ROOTCINT=rootcint  ROOTCINT=rootcint
 # Here the variables defining the local directories  
 # ... not used ...  
 # Here the  PAMELA environmental variables to be checked  
 # ... not used ...  
   
 # Here the local variables used to build the targets  
   
42    
43  # Compilers settings  # Compilers settings
44  ROOTCFLAGS  =`root-config --cflags`  ROOTCFLAGS  =`root-config --cflags`
# Line 59  LD          =g++ Line 51  LD          =g++
51  CXXFLAGS= -O3 -Wall -fPIC ${ROOTCFLAGS} ${PAM_BIT}  CXXFLAGS= -O3 -Wall -fPIC ${ROOTCFLAGS} ${PAM_BIT}
52  #CXXFLAGS= -g -Wall -O ${ROOTCFLAGS} ${PAM_BIT}  #CXXFLAGS= -g -Wall -O ${ROOTCFLAGS} ${PAM_BIT}
53  # flags needed on the pamelatov's:  # flags needed on the pamelatov's:
54  LDFLAGS = -m32  #LDFLAGS = $(PAM_BIT)
55  #LDFLAGS = -g -lmathlib -lpacklib -lkernlib -llapack -lg2c -lm -lnsl -lcrypt -L/cern/2005/lib  LDFLAGS = -lmathlib -lpacklib -lkernlib -llapack -lg2c -lm -lnsl -lcrypt -L/cern/2005/lib $(PAM_BIT)
56  #LDFLAGS = -g -llapack -lg2c -lm -lnsl -lcrypt -L/cern/2005/lib  #LDFLAGS = -g -llapack -lg2c -lm -lnsl -lcrypt -L/cern/2005/lib $(PAM_BIT)
57    
58    CXXSRCS=  Digitizer.cxx DigitizeRunHeader.cxx DigitizeCalo.cxx DigitizeTOF.cxx DigitizeAC.cxx DigitizeS4.cxx DigitizeND.cxx  Write.cxx DigitizeTRK.cxx Pamelagp2Digits.cxx DigitVersion.cxx
59    OBJS=$(CXXSRCS:%.cxx=%.o)
60    
61    CPPSRCS= CRC.cpp calcrc.cpp
62    CPOBJS=$(CPPSRCS:%.cpp=%.o)
63    
64  HEAS =$(SRCS:.cpp=.h)  HEAS =$(SRCS:.cpp=.h)
65  OBJS =$(SRCS:.cpp=.o)  #OBJS =$(SRCS:.cpp=.o)
66  DEPS =$(SRCS:.cpp=.d)  DEPS =$(SRCS:.cpp=.d)
67  CLAS =$(DICS:.cpp= )  CLAS =$(DICS:.cpp= )
68  CLASH=$(DICS:.cpp=.h)  CLASH=$(DICS:.cpp=.h)
# Line 72  JUNK =$(addsuffix ~,${SRCS}) $(addsuffix Line 70  JUNK =$(addsuffix ~,${SRCS}) $(addsuffix
70  DICO =$(addsuffix Dict.o, ${CLAS})  DICO =$(addsuffix Dict.o, ${CLAS})
71  DICH =$(addsuffix Dict.h, ${CLAS})  DICH =$(addsuffix Dict.h, ${CLAS})
72    
73  all: mkverpath Pamelagp2Digits  all: prepare libs Pamelagp2Digits
74          @echo -e ${GREEN} ""          @echo -e ${GREEN} ""
75          @(${EGREEN} " Finished, now you can install the package \n  (use: make install) "; ${RESET})          @(${EGREEN} " Finished, now you can install the package \n  (use: make install) "; ${RESET})
76          @echo -e ${GREEN} ""          @echo -e ${GREEN} ""
77          @${RESET}          @${RESET}
78    
79    prepare: mkverpath
80    
81    libs: $(CPOBJS) ${OBJS} ${DICO}
82    
83  Pamelagp2Digits:  DigitVersion.o CRC.o calcrc.o Pamelagp2Digits.o Digitizer.o DigitizeRunHeader.o DigitizeCalo.o DigitizeTOF.o DigitizeAC.o DigitizeS4.o DigitizeND.o  Write.o DigitizeTRK.o ${OBJS} ${DICO}  
84  #       @(${EWHITE} " Compiling Pamelagp2Digits... \n ")  #Pamelagp2Digits: DigitVersion.o CRC.o calcrc.o Pamelagp2Digits.o Digitizer.o DigitizeRunHeader.o DigitizeCalo.o DigitizeTOF.o DigitizeAC.o DigitizeS4.o DigitizeND.o  Write.o DigitizeTRK.o ${OBJS} ${DICO}
85          $(LD) $(LDFLAGS) -o $@ $^ ${ROOTLIBS} ${CERNLIBS} ${F77LIBS} ${SYSLIBS} ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libsgp4.so ${PAM_YODA}/lib/libyoda.so  Pamelagp2Digits:
86            @(${EWHITE} " Compiling Pamelagp2Digits... \n ")
87            @ $(LD) $(LDFLAGS) -o $@ $^ ${ROOTLIBS} ${CERNLIBS} ${F77LIBS} ${SYSLIBS} ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libsgp4.so ${PAM_YODA}/lib/libyoda.so ${OBJS} $(CPOBJS)
88          @rm -f *.o          @rm -f *.o
89    
90  Digitizer: Digitizer.o ${OBJS} ${DICO}  Digitizer: Digitizer.o ${OBJS} ${DICO}
# Line 89  Digitizer: Digitizer.o ${OBJS} ${DICO} Line 92  Digitizer: Digitizer.o ${OBJS} ${DICO}
92    
93  depend: ${DEPS}  depend: ${DEPS}
94    
95  %.d: %.cpp  
96    %.d: %.cxx
97          @echo Creating dependencies for $<          @echo Creating dependencies for $<
98          @$(CXX) -MM $(CXXFLAGS) $< -o $@          @$(CXX) -MM $(CXXFLAGS) $< -o $@
99    
   
   
100  .SUFFIXES: .cxx  .SUFFIXES: .cxx
101  %.o: %.cxx  %.o: %.cxx
102          $(CXX) $(CXXFLAGS) -c $< `root-config --cflags` -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/          @(${EGREEN} "Creating CXX object file: "${WHITE} "`basename $@`"; ${RESET})
103            @$(CXX) $(CXXFLAGS) -c $< `root-config --cflags` -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/
104    
105    .SUFFIXES: .cpp
106    %.o: %.cpp
107            @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})
108            @$(CXX) $(CXXFLAGS) -c $< `root-config --cflags` -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/
109    
110  .PHONY: clean  .PHONY: clean
111    
112  mkverpath:  mkverpath:
113          @(${EGREEN} creating file DigitVersion.cxx; ${RESET})          @(${EGREEN} creating file DigitVersion.cxx; ${RESET})
114          @echo '#include <TSystem.h>' >  DigitVersion.cxx; echo ' char *DigitizerInfo(bool print){ if ( print ) printf("\nPAMELA PamelaDigitizer version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  DigitVersion.cxx          @echo '#include <TSystem.h>' >  DigitVersion.cxx; echo ' char *DigitizerInfo(bool print){ if ( print ) printf("\nPAMELA PamelaDigitizer version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  DigitVersion.cxx
115          @sleep 0.8          @sleep 1.2
116    
117  clean:  clean:
118    
119    
120          @(${EGREEN} Removing object files .....)          @(${EGREEN} Removing object files .....)
121          @rm -f *~          @rm -f *~
122          @rm -f ${OBJS} ${DICO} *.o          @rm -f ${OBJS} ${CPOBJS} ${DICO} *.o
123          @echo Removing dependencies files .....          @echo " Removing dependencies files ....."
124          @rm -f ${DEPS}          @rm -f ${DEPS}
125          @echo Removing dictionary files .....          @echo " Removing dictionary files ....."
126          @rm -f ${JUNK} ${DICH}          @rm -f ${JUNK} ${DICH}
127          @echo Removing temporary files .....          @echo " Removing temporary files ....."
128            @rm -f ${JUNK}
129            @rm -f DigitVersion.cxx;
130            @echo " Removing Pamelagp2Digits ....."
131          @rm -f ${JUNK}          @rm -f ${JUNK}
132          @rm -f DigitVersion.cxx; ${RESET}          @rm -f Pamelagp2Digits; ${RESET}
133    
134  install:  install:
135  #       @echo "TEST: copying the executable in the PAM_BIN directory";  #       @echo "TEST: copying the executable in the PAM_BIN directory";

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.23