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 |
|
---|
27 | #
|
---|
28 | # connect the include files defined in the config.mk file
|
---|
29 | #
|
---|
30 | # WARNING: the result (whether the linkage works or not) depends on the
|
---|
31 | # order of the libraries
|
---|
32 | #
|
---|
33 | #
|
---|
34 | INCLUDES = -I. -Imgui -Imbase -Imraw -Imdatacheck
|
---|
35 |
|
---|
36 | #
|
---|
37 | # ----->>> mars libraries
|
---|
38 | #
|
---|
39 |
|
---|
40 | MARS_LIB = -Llib -lmgui -lmdatacheck -lmraw -lmbase
|
---|
41 | MARS_LIBB = libmbase.a libmgui.a libmraw.a libmdatacheck.a
|
---|
42 |
|
---|
43 |
|
---|
44 | #------------------------------------------------------------------------------
|
---|
45 |
|
---|
46 | .SUFFIXES: .c .cc .h .o
|
---|
47 |
|
---|
48 |
|
---|
49 | SRCFILES =
|
---|
50 |
|
---|
51 | SRCS = $(SRCFILES)
|
---|
52 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
53 | OBJS = $(SRCFILES:.cc=.o)
|
---|
54 |
|
---|
55 | ############################################################
|
---|
56 |
|
---|
57 | all: rmlib $(PROGRAMS) $(SOLIB)
|
---|
58 |
|
---|
59 | # Use $(CXX) -v ... for a more verbose output
|
---|
60 | $(PROGRAMS): $(MARS_LIBB) $(PROGRAMS:=.o) $(OBJS) MCint.o
|
---|
61 | @echo " Linking $@ ..."
|
---|
62 | $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
|
---|
63 |
|
---|
64 | $(SOLIB): $(MARS_LIBB) $(OBJS) MCint.o
|
---|
65 | @echo " Linking $(SOLIB) ..."
|
---|
66 | $(CXX) $(CXXFLAGS) -shared $(OBJS2) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
|
---|
67 | mv mars.so lib
|
---|
68 |
|
---|
69 | libmbase.a:
|
---|
70 | @echo " Creating libmbase.a:"
|
---|
71 | (cd mbase; make; cd ..; mv mbase/libmbase.a lib)
|
---|
72 |
|
---|
73 | libmraw.a:
|
---|
74 | @echo " Creating libmraw.a:"
|
---|
75 | (cd mraw; make; cd ..; mv mraw/libmraw.a lib)
|
---|
76 |
|
---|
77 | libmgui.a:
|
---|
78 | @echo " Creating libmgui.a:"
|
---|
79 | (cd mgui; make; cd ..; mv mgui/libmgui.a lib)
|
---|
80 |
|
---|
81 | libmdatacheck.a:
|
---|
82 | @echo " Creating libmdatacheck.a:"
|
---|
83 | (cd mdatacheck; make; cd ..; mv mdatacheck/libmdatacheck.a lib)
|
---|
84 |
|
---|
85 | dox:
|
---|
86 | @echo " Creating html documentation:"
|
---|
87 | root -b -q dohtml.C
|
---|
88 |
|
---|
89 |
|
---|
90 | MCint.cc: $(HEADERS)
|
---|
91 | @echo "Generating dictionary MCint.cc..."
|
---|
92 | @$(ROOTSYS)/bin/rootcint -f MCint.cc \
|
---|
93 | -c $(INCLUDES) $(HEADERS) LinkDef.h
|
---|
94 |
|
---|
95 | include Makefile.rules
|
---|
96 |
|
---|
97 | clean: rmlib rmcint rmobjs rmcore rmbin
|
---|
98 |
|
---|
99 | # @endcode
|
---|
100 |
|
---|
101 |
|
---|
102 |
|
---|
103 | # DO NOT DELETE
|
---|
104 |
|
---|
105 |
|
---|