source: trunk/MagicSoft/Simulation/Detector/Camera/Makefile@ 5095

Last change on this file since 5095 was 5072, checked in by moralejo, 20 years ago
*** empty log message ***
File size: 5.4 KB
Line 
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.25 $
22# $Author: moralejo $
23# $Date: 2004-09-16 15:16:33 $
24#
25##################################################################
26# @maintitle
27
28# @code
29
30INCLUDEMK = config.mk.${OSTYPE}
31include ${INCLUDEMK}
32
33# @endcode
34
35# @code
36
37# common flags
38INCLUDES = -I${INCLUDE} \
39 -I${INCLUDE_COR} \
40 -I${INCLUDE_MC} \
41 -I${INCLUDE_EVITA} \
42 -I${INCLUDE_EVITA_MC} \
43 -I${INCLUDE_EVITA_RAW} \
44 -I${INCLUDE_EVITA_BASE} \
45 -I${INCLUDE_MARS_MGEOM} \
46 -I${INCLUDE_LONS} \
47 -I${INCLUDE_STAR} \
48 -I${INCLUDE_TRIGGER} \
49 -I${INCLUDE_FADC} \
50 -I${INCLUDE_ROOT} \
51 -I${INCLUDE_CPLUS}
52
53RANLIB = -L${RANLIBDIR} -lranlib
54
55# what is needed for ROOT is inside the config.mk... file
56
57
58# special flags
59
60osf_FORLIBS = -lUfor -lfor -lutil -lots -lm
61#linux_FORLIBS = -lf2c -lm /usr/lib/libc.a
62linux_FORLIBS = -lm -ldl
63#linux_FORLIBS = -lm -ldl -rdynamic
64generic_FORLIBS = -lm
65
66FORLIBS = ${${SYSTEM}_FORLIBS}
67
68# compilation and linking flags
69
70CXXFLAGS = -D__${SYSTEM}__ $(ROOTCFLAGS) ${INCLUDES} ${OPTIM} ${DEBUG}
71CFLAGS = ${CXXFLAGS}
72FFLAGS = ${CXXFLAGS}
73LIBS = ${RANLIB} ${ROOTLIBS} ${ROOTGLIBS} ${GLIBS} \
74 ${INCLUDE_EVITA_MC}/mmc.a ${INCLUDE_EVITA_RAW}/mraw.a \
75 ${INCLUDE_EVITA_BASE}/mbase.a ${INCLUDE_MARS_MGEOM}/mgeom.a
76
77#
78# ----->>> Compile files related to MARS with Makefiles in their
79# directories.
80#
81SUBDIRS = ${INCLUDE_EVITA_BASE} \
82 ${INCLUDE_EVITA_MC} \
83 ${INCLUDE_EVITA_RAW} \
84 ${INCLUDE_MARS_MGEOM}
85
86LIBRARIES = $(SUBDIRS:=.a)
87MRPROPERS = $(SUBDIRS:=.mrproper)
88CLEANERS = $(SUBDIRS:=.clean)
89
90#------------------------------------------------------------------------------
91
92#.SILENT:
93
94.SUFFIXES: .c .cc .cxx .C .c++ .h .hxx .H .h++ .o .so .f
95
96SRCS = \
97 ${INCLUDE_MC}/MCEventHeader.cxx \
98 ${INCLUDE_MC}/MCEventHeader_2.cxx \
99 ${INCLUDE_MC}/MCCphoton.cxx \
100 ${INCLUDE_LONS}/MLons.cxx \
101 ${INCLUDE_STAR}/MStarLight.cxx \
102 ${INCLUDE_TRIGGER}/MTrigger.cxx \
103 ${INCLUDE_TRIGGER}/MGTriggerSignal.cxx \
104 ${INCLUDE_FADC}/MFadc.cxx \
105 ${INCLUDE_FADC}/MGFadcSignal.cxx \
106 creadparam.cxx \
107 camera.cxx
108
109HEADERS = \
110 MCEventHeader.hxx \
111 MCEventHeader_2.hxx \
112 MCCphoton.hxx \
113 MLons.hxx \
114 MStarLight.hxx \
115 MTRigger.hxx \
116 MGTriggerSignal.hxx \
117 MFadc.hxx \
118 MGFadcSignal.hxx \
119 lagrange.h \
120 atm.h \
121 creadparam.h \
122 camera.h
123
124OBJS = \
125 ${INCLUDE_MC}/MCEventHeader.o \
126 ${INCLUDE_MC}/MCEventHeader_2.o \
127 ${INCLUDE_MC}/MCCphoton.o \
128 ${INCLUDE_LONS}/MLons.o \
129 ${INCLUDE_STAR}/MStarLight.o \
130 ${INCLUDE_TRIGGER}/MTrigger.o \
131 ${INCLUDE_TRIGGER}/MGTriggerSignal.o \
132 ${INCLUDE_FADC}/MFadc.o \
133 ${INCLUDE_FADC}/MGFadcSignal.o \
134 creadparam.o \
135 camera.o
136
137############################################################
138
139all: rmlib rmtrig $(PROGRAM)
140 @echo " Done. "
141 @echo " "
142
143$(PROGRAM): $(LIBRARIES) $(OBJS) $(PROGRAMS:=.o)
144 @echo " Linking $@ ..."
145 $(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@
146
147$(LIBRARIES): makefiles
148 @echo " Creating lib$@:"
149 (cd $(@:.a=);make; cd ..)
150
151$(MRPROPERS): makefiles
152 @echo " Doing Mr.Proper in $(@:.mrproper=)"
153 (cd $(@:.mrproper=); (make mrproper > /dev/null); cd ..;)
154
155
156$(CLEANERS): makefiles
157 @echo "Cleaning $(@:.clean=):"
158 (cd $(@:.clean=); make clean; cd ..;)
159rmtrig:
160 @echo " Removing ..."
161 @echo " "
162 @rm -f ${INCLUDE_TRIGGER}/*.o
163
164depend: rmtrig
165 @makedepend $(SRCS) $(INCLUDES) -fMakefile 2> kk.kk ; cat kk.kk
166
167doc: camera-doc
168
169camera-doc:
170 @echo "Generating documentation for camera . . . "
171 $(DOCUM) -latex -o camera.tex \
172 camera.cxx camera.h \
173 creadparam.cxx creadparam.h \
174 moments.cxx moments.h
175 latex "\nonstopmode\input{camera.tex}" && \
176 makeindex camera && \
177 latex "\nonstopmode\input{camera.tex}" && \
178 latex "\nonstopmode\input{camera.tex}"
179 @echo "Files camera.tex and camera.dvi generated."
180
181.cxx.o:
182 @echo "Compiling " $<
183 $(CXX) $(CXXFLAGS) -c $< -o $@
184
185.cc.o:
186 @echo "Compiling " $<
187 $(CXX) $(CXXFLAGS) -c $< -o $@
188
189.c.o:
190 @echo "Compiling " $<
191 $(CC) $(CFLAGS) -c $< -o $@
192
193makefiles:
194 @cp Makefile.* ${INCLUDE_EVITA}
195
196lclean:
197 @echo "Cleanning..."
198 @rm -f *.o core
199
200clean: $(CLEANERS) rmcint rmobjs
201 @echo "Cleanning...done"
202
203mrproper: clean $(MRPROPERS)
204 @echo "Mr.Proper in action . . ."
205 @rm -f $(PROGRAM)
206
207listsrc:
208 @ls -m $(SRCS) $(HEADERS) | sed 's/,//g'
209
210redo: clean all
211
212cflags:
213 @echo $(INCLUDES) $(CXXFLAGS)
214
215#
216# The cleaning facility
217#
218
219rmcint:
220 @echo " Removing cint-stuff..."
221 @rm -f *Cint.*
222
223rmlib:
224 @echo " Removing libraries..."
225 @echo " "
226 @rm -f lib/lib*.a lib*.a
227
228rmobjs:
229 @echo " Removing object files..."
230 @rm -f *.o ../*/*.o
231
232rmcore:
233 @echo " Removing core files..."
234 @rm -f core*
235
236rmbin:
237 @echo " Removing binary files..."
238 @rm -f $(PROGRAM) lib/$(SOLIB) so_locations
239
240rmbak:
241 @echo " Removing backup files..."
242 @rm -f *~ kk.kk *.bak
243
244rmbakmac:
245 @echo " Removing backup files in macros"
246 @rm -f macros/*~
247
248rmhtml:
249 @echo " Removing htmldoc-tree"
250 @rm -rf htmldoc
251# @endcode
252
253# DO NOT DELETE THIS LINE -- make depend depends on it.
Note: See TracBrowser for help on using the repository browser.