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 = merpp readraw mars
|
---|
23 | SOLIB = mars.so
|
---|
24 | CINT = M
|
---|
25 |
|
---|
26 | #
|
---|
27 | # connect the include files defined in the config.mk file
|
---|
28 | #
|
---|
29 | # WARNING: the result (whether the linkage works or not) depends on the
|
---|
30 | # order of the libraries. It seems, that the most base library
|
---|
31 | # must be the last one
|
---|
32 | #
|
---|
33 |
|
---|
34 | #
|
---|
35 | # ----->>> mars libraries
|
---|
36 | #
|
---|
37 | SUBDIRS = mgui \
|
---|
38 | mmain \
|
---|
39 | manalysis \
|
---|
40 | meventdisp \
|
---|
41 | mdatacheck \
|
---|
42 | mmontecarlo \
|
---|
43 | mhist \
|
---|
44 | mfilter \
|
---|
45 | mbase \
|
---|
46 | mraw \
|
---|
47 | mmc
|
---|
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) MCint.o $(PROGRAMS:=.o)
|
---|
73 | @echo " Linking $@ ..."
|
---|
74 | $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
|
---|
75 |
|
---|
76 | $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
|
---|
77 | @echo " Linking $(SOLIB) ..."
|
---|
78 | $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
|
---|
79 | mv mars.so lib
|
---|
80 |
|
---|
81 | $(LIBRARIES):
|
---|
82 | @echo " "
|
---|
83 | @echo " Creating lib$@:"
|
---|
84 | (cd $*; make; 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 mbase"
|
---|
98 | @cd mbase; make mrproper; cd ..
|
---|
99 | @echo "cd .."
|
---|
100 | @echo "cd mraw"
|
---|
101 | @cd mraw; make mrproper; cd ..
|
---|
102 | @echo "cd .."
|
---|
103 | @echo "cd mhist"
|
---|
104 | @cd mhist; make mrproper; cd ..
|
---|
105 | @echo "cd .."
|
---|
106 | @echo "cd mfilter"
|
---|
107 | @cd mfilter; make mrproper; cd ..
|
---|
108 | @echo "cd .."
|
---|
109 | @echo "cd mgui"
|
---|
110 | @cd mgui; make mrproper; cd ..
|
---|
111 | @echo "cd .."
|
---|
112 | @echo "cd mdatacheck"
|
---|
113 | @cd mdatacheck; make mrproper; cd ..
|
---|
114 | @echo "cd .."
|
---|
115 | @echo "cd mmc"
|
---|
116 | @cd mmc; make mrproper; cd ..
|
---|
117 | @echo "cd .."
|
---|
118 | @echo "cd meventdisp"
|
---|
119 | @cd meventdisp; make mrproper; cd ..
|
---|
120 | @echo "cd .."
|
---|
121 | @echo "cd manalysis"
|
---|
122 | @cd manalysis; make mrproper; cd ..
|
---|
123 | @echo "cd .."
|
---|
124 | @echo "cd mmontecarlo"
|
---|
125 | @cd mmontecarlo; make mrproper; cd ..
|
---|
126 | @echo "cd .."
|
---|
127 | @echo "cd mmain"
|
---|
128 | @cd mmain; make mrproper; cd ..
|
---|
129 | @echo "cd .."
|
---|
130 |
|
---|
131 | tar: mrproper
|
---|
132 | @echo "Making tar-file"
|
---|
133 | @tar -cvf ../mars.tar .rootrc *
|
---|
134 | @gzip -9 ../mars.tar
|
---|
135 |
|
---|
136 | # @endcode
|
---|