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.8 $
|
---|
22 | # $Author: moralejo $
|
---|
23 | # $Date: 2004-09-17 15:44:44 $
|
---|
24 | #
|
---|
25 | ##################################################################
|
---|
26 | # @maintitle
|
---|
27 |
|
---|
28 | # @code
|
---|
29 |
|
---|
30 | INCLUDEMK = config.mk.${OSTYPE}
|
---|
31 | include ${INCLUDEMK}
|
---|
32 | PROGRAM = starrespo
|
---|
33 |
|
---|
34 | # @endcode
|
---|
35 |
|
---|
36 | # @code
|
---|
37 |
|
---|
38 | # common flags
|
---|
39 | INCLUDES = -I${INCLUDE} \
|
---|
40 | -I${INCLUDE_COR} \
|
---|
41 | -I${INCLUDE_MC} \
|
---|
42 | -I${INCLUDE_TRIGGER} \
|
---|
43 | -I${INCLUDE_FADC} \
|
---|
44 | -I${INCLUDE_ROOT} \
|
---|
45 | -I${INCLUDE_CPLUS} \
|
---|
46 | -I${INCLUDE_MARS_MBASE} \
|
---|
47 | -I${INCLUDE_MARS_MGEOM} \
|
---|
48 | -I${INCLUDE_MARS_MGUI} \
|
---|
49 | -I${INCLUDE_MARS_MC} \
|
---|
50 | -I${INCLUDE_MARS_MRAW}
|
---|
51 |
|
---|
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 | MARSLIBS = ../../../Mars/libmars.so
|
---|
65 |
|
---|
66 | FORLIBS = ${${SYSTEM}_FORLIBS}
|
---|
67 |
|
---|
68 | # compilation and linking flags
|
---|
69 |
|
---|
70 | CXXFLAGS = -D__${SYSTEM}__ ${INCLUDES} ${OPTIM} ${DEBUG}
|
---|
71 | CFLAGS = ${CXXFLAGS}
|
---|
72 | FFLAGS = ${CXXFLAGS}
|
---|
73 | LIBS = ${RANLIB} ${ROOTLIBS} ${ROOTGLIBS} ${GLIBS} ${MARSLIBS}
|
---|
74 |
|
---|
75 | #
|
---|
76 | # ----->>> Compile files related to MARS with Makefiles in their
|
---|
77 | # directories.
|
---|
78 | #
|
---|
79 |
|
---|
80 | #------------------------------------------------------------------------------
|
---|
81 |
|
---|
82 | #.SILENT:
|
---|
83 |
|
---|
84 | .SUFFIXES: .c .cc .cxx .C .c++ .h .hxx .H .h++ .o .so .f
|
---|
85 |
|
---|
86 | SRCS = \
|
---|
87 | ${INCLUDE_TRIGGER}/MTrigger.cxx \
|
---|
88 | ${INCLUDE_TRIGGER}/MGTriggerSignal.cxx \
|
---|
89 | ${INCLUDE_FADC}/MFadc.cxx \
|
---|
90 | ${INCLUDE_FADC}/MGFadcSignal.cxx \
|
---|
91 | MStarLight.cxx \
|
---|
92 | srreadparam.cxx \
|
---|
93 | starresponse.cxx
|
---|
94 |
|
---|
95 | HEADERS = \
|
---|
96 | MTRigger.hxx \
|
---|
97 | MGTRiggerSignal.hxx \
|
---|
98 | MFadc.hxx \
|
---|
99 | MGFadcSignal.hxx \
|
---|
100 | MStarLight.hxx \
|
---|
101 | srreadparam.h \
|
---|
102 | starresponse.hxx
|
---|
103 |
|
---|
104 | OBJS = \
|
---|
105 | ${INCLUDE_TRIGGER}/MTrigger.o \
|
---|
106 | ${INCLUDE_TRIGGER}/MGTriggerSignal.o \
|
---|
107 | ${INCLUDE_FADC}/MFadc.o \
|
---|
108 | ${INCLUDE_FADC}/MGFadcSignal.o \
|
---|
109 | MStarLight.o \
|
---|
110 | srreadparam.o \
|
---|
111 | starresponse.o
|
---|
112 |
|
---|
113 | ############################################################
|
---|
114 |
|
---|
115 | all: $(PROGRAM)
|
---|
116 | @echo " Done. "
|
---|
117 | @echo " "
|
---|
118 |
|
---|
119 | $(PROGRAM): $(OBJS)
|
---|
120 | @echo " Linking $@ ..."
|
---|
121 | $(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@
|
---|
122 |
|
---|
123 | depend: @makedepend $(SRCS) $(INCLUDES) -fMakefile 2> kk.kk ; cat kk.kk
|
---|
124 |
|
---|
125 | .cxx.o:
|
---|
126 | @echo "Compiling " $<
|
---|
127 | $(CXX) $(CXXFLAGS) -c $< -o $@
|
---|
128 |
|
---|
129 | .cc.o:
|
---|
130 | @echo "Compiling " $<
|
---|
131 | $(CXX) $(CXXFLAGS) -c $< -o $@
|
---|
132 |
|
---|
133 | .c.o:
|
---|
134 | @echo "Compiling " $<
|
---|
135 | $(CC) $(CFLAGS) -c $< -o $@
|
---|
136 |
|
---|
137 | lclean:
|
---|
138 | @echo "Cleanning..."
|
---|
139 | @rm -f *.o core
|
---|
140 |
|
---|
141 | clean: rmcint rmobjs
|
---|
142 | @echo "Cleanning...done"
|
---|
143 |
|
---|
144 | mrproper: clean
|
---|
145 | @echo "Mr.Proper in action . . ."
|
---|
146 | @rm -f $(PROGRAM)
|
---|
147 |
|
---|
148 | listsrc:
|
---|
149 | @ls -m $(SRCS) $(HEADERS) | sed 's/,//g'
|
---|
150 |
|
---|
151 | redo: clean all
|
---|
152 |
|
---|
153 | cflags:
|
---|
154 | @echo $(INCLUDES) $(CXXFLAGS)
|
---|
155 |
|
---|
156 | #
|
---|
157 | # The cleaning facility
|
---|
158 | #
|
---|
159 |
|
---|
160 | rmcint:
|
---|
161 | @echo " Removing cint-stuff..."
|
---|
162 | @rm -f *Cint.*
|
---|
163 |
|
---|
164 | rmlib:
|
---|
165 | @echo " Removing libraries..."
|
---|
166 | @echo " "
|
---|
167 | @rm -f lib/lib*.a lib*.a
|
---|
168 |
|
---|
169 | rmobjs:
|
---|
170 | @echo " Removing object files..."
|
---|
171 | @rm -f *.o ../*/*.o
|
---|
172 |
|
---|
173 | rmcore:
|
---|
174 | @echo " Removing core files..."
|
---|
175 | @rm -f core*
|
---|
176 |
|
---|
177 | rmbin:
|
---|
178 | @echo " Removing binary files..."
|
---|
179 | @rm -f $(PROGRAM) lib/$(SOLIB) so_locations
|
---|
180 |
|
---|
181 | rmbak:
|
---|
182 | @echo " Removing backup files..."
|
---|
183 | @rm -f *~ kk.kk *.bak
|
---|
184 |
|
---|
185 | # @endcode
|
---|
186 |
|
---|
187 | # DO NOT DELETE THIS LINE -- make depend depends on it.
|
---|