1 | ##################################################################
|
---|
2 | #
|
---|
3 | # makefile
|
---|
4 | #
|
---|
5 | # for the MARS software
|
---|
6 | #
|
---|
7 | ##################################################################
|
---|
8 | # @maintitle
|
---|
9 |
|
---|
10 | # @code
|
---|
11 |
|
---|
12 | #
|
---|
13 | # please change all system depend values in the
|
---|
14 | # config.mk.${OSTYPE} file
|
---|
15 | #
|
---|
16 | #
|
---|
17 | include Makefile.conf.$(OSTYPE)
|
---|
18 | include Makefile.conf.general
|
---|
19 |
|
---|
20 | #
|
---|
21 |
|
---|
22 | PROGRAMS = testse starg cosy bend
|
---|
23 | SOLIB = cosy.so
|
---|
24 | CINT = M
|
---|
25 | INCLUDES = -I. -Imain -Ibase -Icandrv -Iincl -Igui -Ivideodev -Icatalog -Idevdrv
|
---|
26 | LIBS = -lpng -lz -L/usr/X11R6/lib -lpthread
|
---|
27 |
|
---|
28 | #
|
---|
29 | # connect the include files defined in the config.mk file
|
---|
30 | #
|
---|
31 | # WARNING: the result (whether the linkage works or not) depends on the
|
---|
32 | # order of the libraries. It seems, that the most base library
|
---|
33 | # must be the last one
|
---|
34 | #
|
---|
35 |
|
---|
36 | #
|
---|
37 | # ----->>> mars libraries
|
---|
38 | #
|
---|
39 | SUBDIRS = \
|
---|
40 | main \
|
---|
41 | tcpip \
|
---|
42 | gui \
|
---|
43 | catalog \
|
---|
44 | videodev \
|
---|
45 | devdrv \
|
---|
46 | candrv \
|
---|
47 | caos \
|
---|
48 | base \
|
---|
49 | slalib
|
---|
50 |
|
---|
51 | LIBRARIES = $(SUBDIRS:=.a)
|
---|
52 |
|
---|
53 | #------------------------------------------------------------------------------
|
---|
54 |
|
---|
55 | .SUFFIXES: .c .cc .h .o
|
---|
56 |
|
---|
57 | SRCFILES =
|
---|
58 |
|
---|
59 | SRCS = $(SRCFILES)
|
---|
60 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
61 | OBJS = $(SRCFILES:.cc=.o)
|
---|
62 |
|
---|
63 | ############################################################
|
---|
64 |
|
---|
65 | all: rmlib $(PROGRAMS) $(SOLIB)
|
---|
66 |
|
---|
67 | # Use $(CXX) -v ... for a more verbose output
|
---|
68 | #
|
---|
69 | # We could link mars.so instead of all libraries. This would need
|
---|
70 | # some MBs less space on the HD. But this means, that the Shared
|
---|
71 | # Library Path in your system must be set properly to be able to start
|
---|
72 | # 'mars'
|
---|
73 | #
|
---|
74 | $(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(PROGRAMS:=.o)
|
---|
75 | @echo " Linking $@ ..."
|
---|
76 | $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) $@.o $(MARS_LIB) $(ROOTGLIBS) -o $@
|
---|
77 |
|
---|
78 | $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
|
---|
79 | @echo " Linking $(SOLIB) ..."
|
---|
80 | $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
|
---|
81 | mv cosy.so lib
|
---|
82 |
|
---|
83 | $(LIBRARIES):
|
---|
84 | @echo " "
|
---|
85 | @echo " Creating lib$@:"
|
---|
86 | (cd $*; make -f Makefile; cd ..; mv $*/$@ lib/lib$@)
|
---|
87 |
|
---|
88 | dox:
|
---|
89 | @echo " Creating html documentation:"
|
---|
90 | root -b -q dohtml.C
|
---|
91 |
|
---|
92 | include Makefile.rules
|
---|
93 |
|
---|
94 | clean: rmlib rmcint rmobjs rmcore rmbin
|
---|
95 |
|
---|
96 | mrproper: clean rmbak
|
---|
97 | @rm -f macros/*~
|
---|
98 | @rm -rf htmldoc
|
---|
99 | @echo "cd base"
|
---|
100 | @cd base; make mrproper; cd ..
|
---|
101 | @echo "cd .."
|
---|
102 | @echo "cd caos"
|
---|
103 | @cd caos; make mrproper; cd ..
|
---|
104 | @echo "cd .."
|
---|
105 | @echo "cd candrv"
|
---|
106 | @cd candrv; make mrproper; cd ..
|
---|
107 | @echo "cd .."
|
---|
108 | @echo "cd devdrv"
|
---|
109 | @cd devdrv; make mrproper; cd ..
|
---|
110 | @echo "cd .."
|
---|
111 | @echo "cd gui"
|
---|
112 | @cd gui; make mrproper; cd ..
|
---|
113 | @echo "cd .."
|
---|
114 | @echo "cd videodev"
|
---|
115 | @cd videodev; make mrproper; cd ..
|
---|
116 | @echo "cd .."
|
---|
117 | @echo "cd tcpip"
|
---|
118 | @cd tcpip; make mrproper; cd ..
|
---|
119 | @echo "cd .."
|
---|
120 | @echo "cd catalog"
|
---|
121 | @cd catalog; make mrproper; cd ..
|
---|
122 | @echo "cd .."
|
---|
123 | @echo "cd main"
|
---|
124 | @cd main; make mrproper; cd ..
|
---|
125 | @echo "cd .."
|
---|
126 |
|
---|
127 | links:
|
---|
128 | @ln -sf ../../Mars/mbase/MAGIC.h base/MAGIC.h
|
---|
129 | @ln -sf ../../Mars/mbase/MLog.h base/MLog.h
|
---|
130 | @ln -sf ../../Mars/mbase/MLog.cc base/MLog.cc
|
---|
131 | @ln -sf ../../Mars/mbase/MLogPlugin.h base/MLogPlugin.h
|
---|
132 | @ln -sf ../../Mars/mbase/MLogPlugin.cc base/MLogPlugin.cc
|
---|
133 | @ln -sf ../../Mars/mbase/MLogManip.h base/MLogManip.h
|
---|
134 | @ln -sf ../../Mars/mbase/MLogManip.cc base/MLogManip.cc
|
---|
135 | @ln -sf ../../Mars/mbase/MGList.h base/MGList.h
|
---|
136 | @ln -sf ../../Mars/mbase/MGList.cc base/MGList.cc
|
---|
137 | @ln -sf ../../Mars/mbase/MTime.h base/MTime.h
|
---|
138 | @ln -sf ../../Mars/mbase/MTime.cc base/MTime.cc
|
---|
139 | @ln -sf ../../Mars/mbase/MParContainer.h base/MParContainer.h
|
---|
140 | @ln -sf ../../Mars/mbase/MParContainer.cc base/MParContainer.cc
|
---|
141 | @ln -sf ../../Mars/mbase/MString.h base/MString.h
|
---|
142 | @ln -sf ../../Mars/mbase/MString.cc base/MString.cc
|
---|
143 | @ln -sf ../../Mars/mbase/MGMap.h base/MGMap.h
|
---|
144 | @ln -sf ../../Mars/mbase/MGMap.cc base/MGMap.cc
|
---|
145 | @ln -sf ../../Mars/mbase/MGMenu.h base/MGMenu.h
|
---|
146 | @ln -sf ../../Mars/mbase/MGMenu.cc base/MGMenu.cc
|
---|
147 | @ln -sf ../../Mars/mgeom/MGeomMirror.h base/MGeomMirror.h
|
---|
148 | @ln -sf ../../Mars/mgeom/MGeomMirror.cc base/MGeomMirror.cc
|
---|
149 | @ln -sf ../../Mars/mgeom/MGeomCam.h base/MGeomCam.h
|
---|
150 | @ln -sf ../../Mars/mgeom/MGeomCam.cc base/MGeomCam.cc
|
---|
151 | @ln -sf ../../Mars/mgeom/MGeomPix.h base/MGeomPix.h
|
---|
152 | @ln -sf ../../Mars/mgeom/MGeomPix.cc base/MGeomPix.cc
|
---|
153 | @ln -sf ../../Mars/mgeom/MGeomCamMagic.h base/MGeomCamMagic.h
|
---|
154 | @ln -sf ../../Mars/mgeom/MGeomCamMagic.cc base/MGeomCamMagic.cc
|
---|
155 | @ln -sf ../../Mars/mastro/MAstro.h base/MAstro.h
|
---|
156 | @ln -sf ../../Mars/mastro/MAstro.cc base/MAstro.cc
|
---|
157 | @ln -sf ../../Mars/mastro/MAstroCatalog.h base/MAstroCatalog.h
|
---|
158 | @ln -sf ../../Mars/mastro/MAstroCatalog.cc base/MAstroCatalog.cc
|
---|
159 | @ln -sf ../../Mars/mastro/MAstroCamera.h base/MAstroCamera.h
|
---|
160 | @ln -sf ../../Mars/mastro/MAstroCamera.cc base/MAstroCamera.cc
|
---|
161 | @ln -sf ../../Mars/mastro/MAstroSky2Local.h base/MAstroSky2Local.h
|
---|
162 | @ln -sf ../../Mars/mastro/MAstroSky2Local.cc base/MAstroSky2Local.cc
|
---|
163 | @ln -sf ../../Mars/mastro/MObservatory.h base/MObservatory.h
|
---|
164 | @ln -sf ../../Mars/mastro/MObservatory.cc base/MObservatory.cc
|
---|
165 | @ln -sf ../../Mars/mhist/MHCamera.h base/MHCamera.h
|
---|
166 | @ln -sf ../../Mars/mhist/MHCamera.cc base/MHCamera.cc
|
---|
167 | @ln -sf ../../Mars/mhbase/MH.h base/MH.h
|
---|
168 | @ln -sf ../../Mars/mhbase/MH.cc base/MH.cc
|
---|
169 | @ln -sf ../../Mars/mhbase/MBinning.h base/MBinning.h
|
---|
170 | @ln -sf ../../Mars/mhbase/MBinning.cc base/MBinning.cc
|
---|
171 | @ln -sf ../../Mars/mbase/MParList.h base/MParList.h
|
---|
172 | @ln -sf ../../Mars/mbase/MParList.cc base/MParList.cc
|
---|
173 | @ln -sf ../../Mars/mgui/MHexagon.h base/MHexagon.h
|
---|
174 | @ln -sf ../../Mars/mgui/MHexagon.cc base/MHexagon.cc
|
---|
175 | @ln -sf ../../Mars/mgui/MCamEvent.h base/MCamEvent.h
|
---|
176 | @ln -sf ../../Mars/mgui/MCamEvent.cc base/MCamEvent.cc
|
---|
177 |
|
---|
178 | magic:
|
---|
179 | @ln -sf bending_magic.txt bending.txt
|
---|
180 | @ln -sf prepos_magic.txt prepos.txt
|
---|
181 | @ln -sf .cosyrc_magic .cosyrc
|
---|
182 |
|
---|
183 | model:
|
---|
184 | @ln -sf bending_model.txt bending.txt
|
---|
185 | @ln -sf prepos_model.txt prepos.txt
|
---|
186 | @ln -sf .cosyrc_model .cosyrc
|
---|
187 |
|
---|
188 | tar: mrproper
|
---|
189 | @echo "Making tar-file"
|
---|
190 | @tar -cvf ../cosy.tar *
|
---|
191 | @gzip -9 ../cosy.tar
|
---|
192 |
|
---|
193 | install:
|
---|
194 | @echo Installing cosy to ~stesy/Cosy
|
---|
195 | @echo Copy 'cosy'
|
---|
196 | @chmod u+w /home/stesy/Cosy/cosy
|
---|
197 | @cp cosy /home/stesy/Cosy/
|
---|
198 | @chmod a-w /home/stesy/Cosy/cosy
|
---|
199 | @echo Copy cosy resources '.cosyrc'
|
---|
200 | @chmod u+w /home/stesy/Cosy/.cosyrc
|
---|
201 | @cp .cosyrc /home/stesy/Cosy/
|
---|
202 | @chmod a-w /home/stesy/Cosy/.cosyrc
|
---|
203 | @echo Copy bending model 'bending.txt'
|
---|
204 | @chmod u+w /home/stesy/Cosy/bending.txt
|
---|
205 | @cp bending.txt /home/stesy/Cosy
|
---|
206 | @chmod a-w /home/stesy/Cosy/bending.txt
|
---|
207 | @echo Copy LED offsets 'leds.txt'
|
---|
208 | @chmod u+w /home/stesy/Cosy/leds.txt
|
---|
209 | @cp leds.txt /home/stesy/Cosy/
|
---|
210 | @chmod a-w /home/stesy/Cosy/leds.txt
|
---|
211 | @echo Copy predefined positions 'prepos.txt'
|
---|
212 | @chmod u+w /home/stesy/Cosy/prepos.txt
|
---|
213 | @cp prepos.txt /home/stesy/Cosy/
|
---|
214 | @chmod a-w /home/stesy/Cosy/prepos.txt
|
---|
215 | @echo Copy star catalog 'stars.txt'
|
---|
216 | @chmod u+w /home/stesy/Cosy/stars.txt
|
---|
217 | @cp stars.txt /home/stesy/Cosy/
|
---|
218 | @chmod a-w /home/stesy/Cosy/stars.txt
|
---|
219 | @echo Copy SAO catalog
|
---|
220 | @chmod u+w /home/stesy/Cosy/sao/sao-*
|
---|
221 | @cp sao/sao-* /home/stesy/Cosy/sao/
|
---|
222 | @chmod a-w /home/stesy/Cosy/sao/sao-*
|
---|
223 | @echo finished...
|
---|
224 |
|
---|
225 | # @endcode
|
---|