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