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

Last change on this file since 5109 was 5104, checked in by moralejo, 20 years ago
Cleaned up makefiles, it is not necessary longer to recompile MTrigger independently for Camera and StarResponse
File size: 4.5 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.27 $
22# $Author: moralejo $
23# $Date: 2004-09-17 15:44:43 $
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_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
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
61linux_FORLIBS = -lm -ldl
62generic_FORLIBS = -lm
63
64FORLIBS = ${${SYSTEM}_FORLIBS}
65MARSLIBS = ../../../Mars/libmars.so
66
67# compilation and linking flags
68
69CXXFLAGS = -D__${SYSTEM}__ $(ROOTCFLAGS) ${INCLUDES} ${OPTIM} ${DEBUG}
70CFLAGS = ${CXXFLAGS}
71FFLAGS = ${CXXFLAGS}
72LIBS = ${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
80SRCS = \
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
93HEADERS = \
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
108OBJS = \
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
123all: $(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
135depend: @makedepend $(SRCS) $(INCLUDES) -fMakefile 2> kk.kk ; cat kk.kk
136
137doc: camera-doc
138
139camera-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
163makefiles:
164 @cp Makefile.* ${INCLUDE_EVITA}
165
166lclean:
167 @echo "Cleanning..."
168 @rm -f *.o core
169
170clean: $(CLEANERS) rmcint rmobjs
171 @echo "Cleanning...done"
172
173mrproper: clean $(MRPROPERS)
174 @echo "Mr.Proper in action . . ."
175 @rm -f $(PROGRAM)
176
177listsrc:
178 @ls -m $(SRCS) $(HEADERS) | sed 's/,//g'
179
180redo: clean all
181
182cflags:
183 @echo $(INCLUDES) $(CXXFLAGS)
184
185#
186# The cleaning facility
187#
188
189rmcint:
190 @echo " Removing cint-stuff..."
191 @rm -f *Cint.*
192
193rmobjs:
194 @echo " Removing object files..."
195 @rm -f *.o ../*/*.o
196
197rmcore:
198 @echo " Removing core files..."
199 @rm -f core*
200
201rmbin:
202 @echo " Removing binary files..."
203 @rm -f $(PROGRAM) lib/$(SOLIB) so_locations
204
205rmbak:
206 @echo " Removing backup files..."
207 @rm -f *~ kk.kk *.bak
208
209rmbakmac:
210 @echo " Removing backup files in macros"
211 @rm -f macros/*~
212
213rmhtml:
214 @echo " Removing htmldoc-tree"
215 @rm -rf htmldoc
216# @endcode
217
218# DO NOT DELETE THIS LINE -- make depend depends on it.
Note: See TracBrowser for help on using the repository browser.