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 mdatacheck mbase mraw
|
---|
38 |
|
---|
39 | #
|
---|
40 | # Library rules
|
---|
41 | #
|
---|
42 | MARS_LIB = -Llib $(SUBDIRS:%=-l%)
|
---|
43 | MARS_LIBB = $(SUBDIRS:%=lib%.a)
|
---|
44 | INCLUDES = -I. $(SUBDIRS:%=-I%)
|
---|
45 |
|
---|
46 |
|
---|
47 | #------------------------------------------------------------------------------
|
---|
48 |
|
---|
49 | .SUFFIXES: .c .cc .h .o
|
---|
50 |
|
---|
51 | SRCFILES =
|
---|
52 |
|
---|
53 | SRCS = $(SRCFILES)
|
---|
54 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
55 | OBJS = $(SRCFILES:.cc=.o)
|
---|
56 |
|
---|
57 | ############################################################
|
---|
58 |
|
---|
59 | all: rmlib $(PROGRAMS) $(SOLIB)
|
---|
60 |
|
---|
61 | # Use $(CXX) -v ... for a more verbose output
|
---|
62 | $(PROGRAMS): $(MARS_LIBB) $(PROGRAMS:=.o) $(OBJS) MCint.o
|
---|
63 | @echo " Linking $@ ..."
|
---|
64 | $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
|
---|
65 |
|
---|
66 | $(SOLIB): $(OBJS) $(MARS_LIBB) MCint.o
|
---|
67 | @echo " Linking $(SOLIB) ..."
|
---|
68 | $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:%=%/*.o) $(ROOTGLIBS) -o $@
|
---|
69 | mv mars.so lib
|
---|
70 |
|
---|
71 | $(MARS_LIBB):
|
---|
72 | @echo " Creating $@:"
|
---|
73 | (cd $(@:lib%.a=%); make; cd ..; mv $(@:lib%.a=%)/$@ lib)
|
---|
74 |
|
---|
75 | dox:
|
---|
76 | @echo " Creating html documentation:"
|
---|
77 | root -b -q dohtml.C
|
---|
78 |
|
---|
79 |
|
---|
80 | include Makefile.rules
|
---|
81 |
|
---|
82 | clean: rmlib rmcint rmobjs rmcore rmbin
|
---|
83 |
|
---|
84 | mrproper: clean rmbak
|
---|
85 | @rm -f macros/*~
|
---|
86 | @rm -rf htmldoc
|
---|
87 | @echo "cd mbase"
|
---|
88 | @cd mbase; make mrproper; cd ..
|
---|
89 | @echo "cd .."
|
---|
90 | @echo "cd mraw"
|
---|
91 | @cd mraw; make mrproper; cd ..
|
---|
92 | @echo "cd .."
|
---|
93 | @echo "cd mgui"
|
---|
94 | @cd mgui; make mrproper; cd ..
|
---|
95 | @echo "cd .."
|
---|
96 | @echo "cd mdatacheck"
|
---|
97 | @cd mdatacheck; make mrproper; cd ..
|
---|
98 | @echo "cd .."
|
---|
99 |
|
---|
100 |
|
---|
101 | # @endcode
|
---|