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
|
---|
23 | SOLIB =
|
---|
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 | gui \
|
---|
42 | catalog \
|
---|
43 | videodev \
|
---|
44 | devdrv \
|
---|
45 | candrv \
|
---|
46 | base \
|
---|
47 | slalib
|
---|
48 |
|
---|
49 | LIBRARIES = $(SUBDIRS:=.a)
|
---|
50 |
|
---|
51 | #------------------------------------------------------------------------------
|
---|
52 |
|
---|
53 | .SUFFIXES: .c .cc .h .o
|
---|
54 |
|
---|
55 | SRCFILES =
|
---|
56 |
|
---|
57 | SRCS = $(SRCFILES)
|
---|
58 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
59 | OBJS = $(SRCFILES:.cc=.o)
|
---|
60 |
|
---|
61 | ############################################################
|
---|
62 |
|
---|
63 | all: rmlib $(PROGRAMS) $(SOLIB)
|
---|
64 |
|
---|
65 | # Use $(CXX) -v ... for a more verbose output
|
---|
66 | #
|
---|
67 | # We could link mars.so instead of all libraries. This would need
|
---|
68 | # some MBs less space on the HD. But this means, that the Shared
|
---|
69 | # Library Path in your system must be set properly to be able to start
|
---|
70 | # 'mars'
|
---|
71 | #
|
---|
72 | $(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(PROGRAMS:=.o)
|
---|
73 | @echo " Linking $@ ..."
|
---|
74 | $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) $@.o $(MARS_LIB) $(ROOTGLIBS) -o $@
|
---|
75 |
|
---|
76 | $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
|
---|
77 | @echo " Linking $(SOLIB) ..."
|
---|
78 | $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
|
---|
79 | mv cosy.so lib
|
---|
80 |
|
---|
81 | $(LIBRARIES):
|
---|
82 | @echo " "
|
---|
83 | @echo " Creating lib$@:"
|
---|
84 | (cd $*; make -f Makefile; cd ..; mv $*/$@ lib/lib$@)
|
---|
85 |
|
---|
86 | dox:
|
---|
87 | @echo " Creating html documentation:"
|
---|
88 | root -b -q dohtml.C
|
---|
89 |
|
---|
90 | include Makefile.rules
|
---|
91 |
|
---|
92 | clean: rmlib rmcint rmobjs rmcore rmbin
|
---|
93 |
|
---|
94 | mrproper: clean rmbak
|
---|
95 | @rm -f macros/*~
|
---|
96 | @rm -rf htmldoc
|
---|
97 | @echo "cd base"
|
---|
98 | @cd base; make mrproper; cd ..
|
---|
99 | @echo "cd .."
|
---|
100 | @echo "cd candrv"
|
---|
101 | @cd candrv; make mrproper; cd ..
|
---|
102 | @echo "cd .."
|
---|
103 | @echo "cd devdrv"
|
---|
104 | @cd devdrv; make mrproper; cd ..
|
---|
105 | @echo "cd .."
|
---|
106 | @echo "cd gui"
|
---|
107 | @cd gui; make mrproper; cd ..
|
---|
108 | @echo "cd .."
|
---|
109 | @echo "cd videodev"
|
---|
110 | @cd videodev; make mrproper; cd ..
|
---|
111 | @echo "cd .."
|
---|
112 | @echo "cd catalog"
|
---|
113 | @cd catalog; make mrproper; cd ..
|
---|
114 | @echo "cd .."
|
---|
115 | @echo "cd main"
|
---|
116 | @cd main; make mrproper; cd ..
|
---|
117 | @echo "cd .."
|
---|
118 |
|
---|
119 | tar: mrproper
|
---|
120 | @echo "Making tar-file"
|
---|
121 | @tar -cvf ../cosy.tar *
|
---|
122 | @gzip -9 ../cosy.tar
|
---|
123 |
|
---|
124 | # @endcode
|
---|