source: trunk/MagicSoft/Cosy/Makefile@ 2061

Last change on this file since 2061 was 1953, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 3.6 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
26LIBS = -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#
39SUBDIRS = \
40 main \
41 gui \
42 catalog \
43 videodev \
44 devdrv \
45 candrv \
46 caos \
47 base \
48 slalib
49
50LIBRARIES = $(SUBDIRS:=.a)
51
52#------------------------------------------------------------------------------
53
54.SUFFIXES: .c .cc .h .o
55
56SRCFILES =
57
58SRCS = $(SRCFILES)
59HEADERS = $(SRCFILES:.cc=.h)
60OBJS = $(SRCFILES:.cc=.o)
61
62############################################################
63
64all: rmlib $(PROGRAMS) $(SOLIB)
65
66# Use $(CXX) -v ... for a more verbose output
67#
68# We could link mars.so instead of all libraries. This would need
69# some MBs less space on the HD. But this means, that the Shared
70# Library Path in your system must be set properly to be able to start
71# 'mars'
72#
73$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(PROGRAMS:=.o)
74 @echo " Linking $@ ..."
75 $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) $@.o $(MARS_LIB) $(ROOTGLIBS) -o $@
76
77$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
78 @echo " Linking $(SOLIB) ..."
79 $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
80 mv cosy.so lib
81
82$(LIBRARIES):
83 @echo " "
84 @echo " Creating lib$@:"
85 (cd $*; make -f Makefile; cd ..; mv $*/$@ lib/lib$@)
86
87dox:
88 @echo " Creating html documentation:"
89 root -b -q dohtml.C
90
91include Makefile.rules
92
93clean: rmlib rmcint rmobjs rmcore rmbin
94
95mrproper: clean rmbak
96 @rm -f macros/*~
97 @rm -rf htmldoc
98 @echo "cd base"
99 @cd base; make mrproper; cd ..
100 @echo "cd .."
101 @echo "cd caos"
102 @cd caos; make mrproper; cd ..
103 @echo "cd .."
104 @echo "cd candrv"
105 @cd candrv; make mrproper; cd ..
106 @echo "cd .."
107 @echo "cd devdrv"
108 @cd devdrv; make mrproper; cd ..
109 @echo "cd .."
110 @echo "cd gui"
111 @cd gui; make mrproper; cd ..
112 @echo "cd .."
113 @echo "cd videodev"
114 @cd videodev; make mrproper; cd ..
115 @echo "cd .."
116 @echo "cd catalog"
117 @cd catalog; make mrproper; cd ..
118 @echo "cd .."
119 @echo "cd main"
120 @cd main; make mrproper; cd ..
121 @echo "cd .."
122
123links:
124 @ln -sf ../../Mars/mbase/MAGIC.h base/MAGIC.h
125 @ln -sf ../../Mars/mbase/MLog.h base/MLog.h
126 @ln -sf ../../Mars/mbase/MLog.cc base/MLog.cc
127 @ln -sf ../../Mars/mbase/MLogManip.h base/MLogManip.h
128 @ln -sf ../../Mars/mbase/MLogManip.cc base/MLogManip.cc
129 @ln -sf ../../Mars/mbase/MGList.h base/MGList.h
130 @ln -sf ../../Mars/mbase/MGList.cc base/MGList.cc
131 @ln -sf ../../Mars/mbase/MParContainer.h base/MParContainer.h
132 @ln -sf ../../Mars/mbase/MParContainer.cc base/MParContainer.cc
133 @ln -sf ../../Mars/mtemp/MObservatory.h base/MObservatory.h
134 @ln -sf ../../Mars/mtemp/MObservatory.cc base/MObservatory.cc
135
136magic:
137 @ln -sf bending_magic.txt bending.txt
138 @ln -sf prepos_magic.txt prepos.txt
139 @ln -sf .cosyrc_magic .cosyrc
140
141model:
142 @ln -sf bending_model.txt bending.txt
143 @ln -sf prepos_model.txt prepos.txt
144 @ln -sf .cosyrc_model .cosyrc
145
146tar: mrproper
147 @echo "Making tar-file"
148 @tar -cvf ../cosy.tar *
149 @gzip -9 ../cosy.tar
150
151# @endcode
Note: See TracBrowser for help on using the repository browser.