source: trunk/MagicSoft/Cosy/Makefile@ 8747

Last change on this file since 8747 was 7787, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 4.2 KB
Line 
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#
17include Makefile.conf.$(OSTYPE)
18include Makefile.conf.general
19
20#
21
22PROGRAMS = testse starg cosy bend
23SOLIB = cosy.so
24CINT = M
25INCLUDES = -I. -Imain -Ibase -Icandrv -Iincl -Igui -Ivideodev -Icatalog -Idevdrv -Imars
26LIBS = -lpng -lz -L/usr/X11R6/lib -lpthread libmars.so
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#
39SUBDIRS = \
40 main \
41 tcpip \
42 gui \
43 catalog \
44 videodev \
45 devdrv \
46 candrv \
47 caos \
48 base \
49 slalib
50
51LIBRARIES = $(SUBDIRS:=.a)
52
53#------------------------------------------------------------------------------
54
55.SUFFIXES: .c .cc .h .o
56
57SRCFILES =
58
59SRCS = $(SRCFILES)
60HEADERS = $(SRCFILES:.cc=.h)
61OBJS = $(SRCFILES:.cc=.o)
62
63############################################################
64
65all: 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
88dox:
89 @echo " Creating html documentation:"
90 root -b -q dohtml.C
91
92include Makefile.rules
93
94clean: rmlib rmcint rmobjs rmcore rmbin
95
96mrproper: 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
127links:
128 @ln -sf /home/caos/March06/Mars/*/*.h mars
129 @ln -sf /home/caos/March06/Mars/libmars.so
130
131magic:
132 @ln -sf bending_magic.txt bending.txt
133 @ln -sf prepos_magic.txt prepos.txt
134 @ln -sf .cosyrc_magic .cosyrc
135
136model:
137 @ln -sf bending_model.txt bending.txt
138 @ln -sf prepos_model.txt prepos.txt
139 @ln -sf .cosyrc_model .cosyrc
140
141tar: mrproper
142 @echo "Making tar-file"
143 @tar -cvf ../cosy.tar *
144 @gzip -9 ../cosy.tar
145
146install:
147 @echo Installing cosy to ~stesy/Cosy
148 @echo Copy 'cosy'
149 @chmod u+w /home/stesy/Cosy/cosy
150 @cp cosy /home/stesy/Cosy/
151 @chmod a-w /home/stesy/Cosy/cosy
152 @echo Copy cosy resources '.cosyrc'
153 @chmod u+w /home/stesy/Cosy/.cosyrc
154 @cp .cosyrc /home/stesy/Cosy/
155 @chmod a-w /home/stesy/Cosy/.cosyrc
156 @echo Copy bending model 'bending.txt'
157 @chmod u+w /home/stesy/Cosy/bending.txt
158 @cp bending.txt /home/stesy/Cosy
159 @chmod a-w /home/stesy/Cosy/bending.txt
160 @echo Copy LED offsets 'leds.txt'
161 @chmod u+w /home/stesy/Cosy/leds.txt
162 @cp leds.txt /home/stesy/Cosy/
163 @chmod a-w /home/stesy/Cosy/leds.txt
164 @echo Copy predefined positions 'prepos.txt'
165 @chmod u+w /home/stesy/Cosy/prepos.txt
166 @cp prepos.txt /home/stesy/Cosy/
167 @chmod a-w /home/stesy/Cosy/prepos.txt
168 @echo Copy star catalog 'stars.txt'
169 @chmod u+w /home/stesy/Cosy/stars.txt
170 @cp stars.txt /home/stesy/Cosy/
171 @chmod a-w /home/stesy/Cosy/stars.txt
172 @echo Copy PPM catalog
173 @chmod u+w /home/stesy/Cosy/ppm9.bin
174 @cp ppm9.bin /home/stesy/Cosy/
175 @chmod a-w /home/stesy/Cosy/ppm9.bin
176 @echo finished...
177
178# @endcode
Note: See TracBrowser for help on using the repository browser.