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 | # @endcode
|
---|
21 |
|
---|
22 | # @code
|
---|
23 |
|
---|
24 | PROGRAMS = merpp readraw mars
|
---|
25 | SOLIB = mars.so
|
---|
26 | CINT = M
|
---|
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
|
---|
33 | #
|
---|
34 | #
|
---|
35 | INCLUDES = -I. -Imgui -Imbase -Imraw -Imdatacheck
|
---|
36 |
|
---|
37 | #
|
---|
38 | # ----->>> mars libraries
|
---|
39 | #
|
---|
40 |
|
---|
41 | MARS_LIB = -Llib -lmgui -lmdatacheck -lmraw -lmbase
|
---|
42 | MARS_LIBB = libmbase.a libmgui.a libmraw.a libmdatacheck.a
|
---|
43 |
|
---|
44 |
|
---|
45 | #------------------------------------------------------------------------------
|
---|
46 |
|
---|
47 | .SUFFIXES: .c .cc .h .o
|
---|
48 |
|
---|
49 |
|
---|
50 | SRCFILES =
|
---|
51 |
|
---|
52 | SRCS = $(SRCFILES)
|
---|
53 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
54 | OBJS = $(SRCFILES:.cc=.o)
|
---|
55 |
|
---|
56 | ############################################################
|
---|
57 |
|
---|
58 | all: rmlib $(PROGRAMS) $(SOLIB)
|
---|
59 |
|
---|
60 | # Use $(CXX) -v ... for a more verbose output
|
---|
61 | $(PROGRAMS): $(MARS_LIBB) $(PROGRAMS:=.o) $(OBJS) MCint.o
|
---|
62 | @echo " Linking $@ ..."
|
---|
63 | $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
|
---|
64 |
|
---|
65 | $(SOLIB): $(MARS_LIBB) $(OBJS) MCint.o
|
---|
66 | @echo " Linking $(SOLIB) ..."
|
---|
67 | $(CXX) $(CXXFLAGS) -shared $(OBJS2) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
|
---|
68 | mv mars.so lib
|
---|
69 |
|
---|
70 | libmbase.a:
|
---|
71 | @echo " Creating libmbase.a:"
|
---|
72 | (cd mbase; make; cd ..; mv mbase/libmbase.a lib)
|
---|
73 |
|
---|
74 | libmraw.a:
|
---|
75 | @echo " Creating libmraw.a:"
|
---|
76 | (cd mraw; make; cd ..; mv mraw/libmraw.a lib)
|
---|
77 |
|
---|
78 | libmgui.a:
|
---|
79 | @echo " Creating libmgui.a:"
|
---|
80 | (cd mgui; make; cd ..; mv mgui/libmgui.a lib)
|
---|
81 |
|
---|
82 | libmdatacheck.a:
|
---|
83 | @echo " Creating libmdatacheck.a:"
|
---|
84 | (cd mdatacheck; make; cd ..; mv mdatacheck/libmdatacheck.a lib)
|
---|
85 |
|
---|
86 | dox:
|
---|
87 | @echo " Creating html documentation:"
|
---|
88 | root -b -q dohtml.C
|
---|
89 |
|
---|
90 |
|
---|
91 | include Makefile.rules
|
---|
92 |
|
---|
93 | clean: rmlib rmcint rmobjs rmcore rmbin
|
---|
94 |
|
---|
95 | mrproper: clean rmbak
|
---|
96 | @rm -f macros/*~
|
---|
97 | @rm -rf htmldoc
|
---|
98 | @echo "cd mbase"
|
---|
99 | @cd mbase; make mrproper; cd ..
|
---|
100 | @echo "cd .."
|
---|
101 | @echo "cd mraw"
|
---|
102 | @cd mraw; make mrproper; cd ..
|
---|
103 | @echo "cd .."
|
---|
104 | @echo "cd mgui"
|
---|
105 | @cd mgui; make mrproper; cd ..
|
---|
106 | @echo "cd .."
|
---|
107 | @echo "cd mdatacheck"
|
---|
108 | @cd mdatacheck; make mrproper; cd ..
|
---|
109 | @echo "cd .."
|
---|
110 |
|
---|
111 |
|
---|
112 | # @endcode
|
---|