1 | ##################################################################
|
---|
2 | #
|
---|
3 | # makefile
|
---|
4 | #
|
---|
5 | # @file makefile
|
---|
6 | # @title Simulation of the camera and trigger logic
|
---|
7 | # @author J C Gonz\'alez
|
---|
8 | # @email gonzalez@mppmu.mpg.de
|
---|
9 | # @date Fri Mar 12 11:51:11 MET 1999
|
---|
10 | #
|
---|
11 | #_______________________________________________________________
|
---|
12 | #
|
---|
13 | # Created: Fri Mar 12 11:51:11 MET 1999
|
---|
14 | # Author: Jose Carlos Gonzalez
|
---|
15 | # Purpose: Makefile for the compilation of the camera program
|
---|
16 | # Notes:
|
---|
17 | #
|
---|
18 | #---------------------------------------------------------------
|
---|
19 | #
|
---|
20 | # $RCSfile: Makefile,v $
|
---|
21 | # $Revision: 1.27 $
|
---|
22 | # $Author: moralejo $
|
---|
23 | # $Date: 2004-09-17 15:44:43 $
|
---|
24 | #
|
---|
25 | ##################################################################
|
---|
26 | # @maintitle
|
---|
27 |
|
---|
28 | # @code
|
---|
29 |
|
---|
30 | INCLUDEMK = config.mk.${OSTYPE}
|
---|
31 | include ${INCLUDEMK}
|
---|
32 |
|
---|
33 | # @endcode
|
---|
34 |
|
---|
35 | # @code
|
---|
36 |
|
---|
37 | # common flags
|
---|
38 | INCLUDES = -I${INCLUDE} \
|
---|
39 | -I${INCLUDE_COR} \
|
---|
40 | -I${INCLUDE_MC} \
|
---|
41 | -I${INCLUDE_LONS} \
|
---|
42 | -I${INCLUDE_STAR} \
|
---|
43 | -I${INCLUDE_TRIGGER} \
|
---|
44 | -I${INCLUDE_FADC} \
|
---|
45 | -I${INCLUDE_ROOT} \
|
---|
46 | -I${INCLUDE_CPLUS} \
|
---|
47 | -I${INCLUDE_MARS_MBASE} \
|
---|
48 | -I${INCLUDE_MARS_MGEOM} \
|
---|
49 | -I${INCLUDE_MARS_MGUI} \
|
---|
50 | -I${INCLUDE_MARS_MC} \
|
---|
51 | -I${INCLUDE_MARS_MRAW}
|
---|
52 |
|
---|
53 | RANLIB = -L${RANLIBDIR} -lranlib
|
---|
54 |
|
---|
55 | # what is needed for ROOT is inside the config.mk... file
|
---|
56 |
|
---|
57 |
|
---|
58 | # special flags
|
---|
59 |
|
---|
60 | osf_FORLIBS = -lUfor -lfor -lutil -lots -lm
|
---|
61 | linux_FORLIBS = -lm -ldl
|
---|
62 | generic_FORLIBS = -lm
|
---|
63 |
|
---|
64 | FORLIBS = ${${SYSTEM}_FORLIBS}
|
---|
65 | MARSLIBS = ../../../Mars/libmars.so
|
---|
66 |
|
---|
67 | # compilation and linking flags
|
---|
68 |
|
---|
69 | CXXFLAGS = -D__${SYSTEM}__ $(ROOTCFLAGS) ${INCLUDES} ${OPTIM} ${DEBUG}
|
---|
70 | CFLAGS = ${CXXFLAGS}
|
---|
71 | FFLAGS = ${CXXFLAGS}
|
---|
72 | LIBS = ${RANLIB} ${ROOTLIBS} ${ROOTGLIBS} ${GLIBS} ${MARSLIBS}
|
---|
73 |
|
---|
74 | #------------------------------------------------------------------------------
|
---|
75 |
|
---|
76 | #.SILENT:
|
---|
77 |
|
---|
78 | .SUFFIXES: .c .cc .cxx .C .c++ .h .hxx .H .h++ .o .so .f
|
---|
79 |
|
---|
80 | SRCS = \
|
---|
81 | ${INCLUDE_MC}/MCEventHeader.cxx \
|
---|
82 | ${INCLUDE_MC}/MCEventHeader_2.cxx \
|
---|
83 | ${INCLUDE_MC}/MCCphoton.cxx \
|
---|
84 | ${INCLUDE_LONS}/MLons.cxx \
|
---|
85 | ${INCLUDE_STAR}/MStarLight.cxx \
|
---|
86 | ${INCLUDE_TRIGGER}/MTrigger.cxx \
|
---|
87 | ${INCLUDE_TRIGGER}/MGTriggerSignal.cxx \
|
---|
88 | ${INCLUDE_FADC}/MFadc.cxx \
|
---|
89 | ${INCLUDE_FADC}/MGFadcSignal.cxx \
|
---|
90 | creadparam.cxx \
|
---|
91 | camera.cxx
|
---|
92 |
|
---|
93 | HEADERS = \
|
---|
94 | MCEventHeader.hxx \
|
---|
95 | MCEventHeader_2.hxx \
|
---|
96 | MCCphoton.hxx \
|
---|
97 | MLons.hxx \
|
---|
98 | MStarLight.hxx \
|
---|
99 | MTRigger.hxx \
|
---|
100 | MGTriggerSignal.hxx \
|
---|
101 | MFadc.hxx \
|
---|
102 | MGFadcSignal.hxx \
|
---|
103 | lagrange.h \
|
---|
104 | atm.h \
|
---|
105 | creadparam.h \
|
---|
106 | camera.h
|
---|
107 |
|
---|
108 | OBJS = \
|
---|
109 | ${INCLUDE_MC}/MCEventHeader.o \
|
---|
110 | ${INCLUDE_MC}/MCEventHeader_2.o \
|
---|
111 | ${INCLUDE_MC}/MCCphoton.o \
|
---|
112 | ${INCLUDE_LONS}/MLons.o \
|
---|
113 | ${INCLUDE_STAR}/MStarLight.o \
|
---|
114 | ${INCLUDE_TRIGGER}/MTrigger.o \
|
---|
115 | ${INCLUDE_TRIGGER}/MGTriggerSignal.o \
|
---|
116 | ${INCLUDE_FADC}/MFadc.o \
|
---|
117 | ${INCLUDE_FADC}/MGFadcSignal.o \
|
---|
118 | creadparam.o \
|
---|
119 | camera.o
|
---|
120 |
|
---|
121 | ############################################################
|
---|
122 |
|
---|
123 | all: $(PROGRAM)
|
---|
124 | @echo " Done. "
|
---|
125 | @echo " "
|
---|
126 |
|
---|
127 | $(PROGRAM): $(LIBRARIES) $(OBJS) $(PROGRAMS:=.o)
|
---|
128 | @echo " Linking $@ ..."
|
---|
129 | $(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@
|
---|
130 |
|
---|
131 | $(CLEANERS): makefiles
|
---|
132 | @echo "Cleaning $(@:.clean=):"
|
---|
133 | (cd $(@:.clean=); make clean; cd ..;)
|
---|
134 |
|
---|
135 | depend: @makedepend $(SRCS) $(INCLUDES) -fMakefile 2> kk.kk ; cat kk.kk
|
---|
136 |
|
---|
137 | doc: camera-doc
|
---|
138 |
|
---|
139 | camera-doc:
|
---|
140 | @echo "Generating documentation for camera . . . "
|
---|
141 | $(DOCUM) -latex -o camera.tex \
|
---|
142 | camera.cxx camera.h \
|
---|
143 | creadparam.cxx creadparam.h \
|
---|
144 | moments.cxx moments.h
|
---|
145 | latex "\nonstopmode\input{camera.tex}" && \
|
---|
146 | makeindex camera && \
|
---|
147 | latex "\nonstopmode\input{camera.tex}" && \
|
---|
148 | latex "\nonstopmode\input{camera.tex}"
|
---|
149 | @echo "Files camera.tex and camera.dvi generated."
|
---|
150 |
|
---|
151 | .cxx.o:
|
---|
152 | @echo "Compiling " $<
|
---|
153 | $(CXX) $(CXXFLAGS) -c $< -o $@
|
---|
154 |
|
---|
155 | .cc.o:
|
---|
156 | @echo "Compiling " $<
|
---|
157 | $(CXX) $(CXXFLAGS) -c $< -o $@
|
---|
158 |
|
---|
159 | .c.o:
|
---|
160 | @echo "Compiling " $<
|
---|
161 | $(CC) $(CFLAGS) -c $< -o $@
|
---|
162 |
|
---|
163 | makefiles:
|
---|
164 | @cp Makefile.* ${INCLUDE_EVITA}
|
---|
165 |
|
---|
166 | lclean:
|
---|
167 | @echo "Cleanning..."
|
---|
168 | @rm -f *.o core
|
---|
169 |
|
---|
170 | clean: $(CLEANERS) rmcint rmobjs
|
---|
171 | @echo "Cleanning...done"
|
---|
172 |
|
---|
173 | mrproper: clean $(MRPROPERS)
|
---|
174 | @echo "Mr.Proper in action . . ."
|
---|
175 | @rm -f $(PROGRAM)
|
---|
176 |
|
---|
177 | listsrc:
|
---|
178 | @ls -m $(SRCS) $(HEADERS) | sed 's/,//g'
|
---|
179 |
|
---|
180 | redo: clean all
|
---|
181 |
|
---|
182 | cflags:
|
---|
183 | @echo $(INCLUDES) $(CXXFLAGS)
|
---|
184 |
|
---|
185 | #
|
---|
186 | # The cleaning facility
|
---|
187 | #
|
---|
188 |
|
---|
189 | rmcint:
|
---|
190 | @echo " Removing cint-stuff..."
|
---|
191 | @rm -f *Cint.*
|
---|
192 |
|
---|
193 | rmobjs:
|
---|
194 | @echo " Removing object files..."
|
---|
195 | @rm -f *.o ../*/*.o
|
---|
196 |
|
---|
197 | rmcore:
|
---|
198 | @echo " Removing core files..."
|
---|
199 | @rm -f core*
|
---|
200 |
|
---|
201 | rmbin:
|
---|
202 | @echo " Removing binary files..."
|
---|
203 | @rm -f $(PROGRAM) lib/$(SOLIB) so_locations
|
---|
204 |
|
---|
205 | rmbak:
|
---|
206 | @echo " Removing backup files..."
|
---|
207 | @rm -f *~ kk.kk *.bak
|
---|
208 |
|
---|
209 | rmbakmac:
|
---|
210 | @echo " Removing backup files in macros"
|
---|
211 | @rm -f macros/*~
|
---|
212 |
|
---|
213 | rmhtml:
|
---|
214 | @echo " Removing htmldoc-tree"
|
---|
215 | @rm -rf htmldoc
|
---|
216 | # @endcode
|
---|
217 |
|
---|
218 | # DO NOT DELETE THIS LINE -- make depend depends on it.
|
---|