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 | PROGRAM1 = merpp
|
---|
25 | PROGRAM2 = readraw
|
---|
26 | SOLIB = mars.so
|
---|
27 |
|
---|
28 | #
|
---|
29 | # connect the include files defined in the config.mk file
|
---|
30 | #
|
---|
31 | INCLUDES = -I. -Imbase -Imraw
|
---|
32 |
|
---|
33 | #
|
---|
34 | # ----->>> mars libraries
|
---|
35 | #
|
---|
36 |
|
---|
37 | MARS_LIB = -Llib -lmbase -lmraw
|
---|
38 | MARS_LIBB = libmbase.a libmraw.a
|
---|
39 |
|
---|
40 |
|
---|
41 | #------------------------------------------------------------------------------
|
---|
42 |
|
---|
43 | #.SILENT:
|
---|
44 |
|
---|
45 | .SUFFIXES: .c .cc .cxx .h .hxx .o
|
---|
46 |
|
---|
47 |
|
---|
48 | SRCFILES =
|
---|
49 |
|
---|
50 | SRCS = $(SRCFILES)
|
---|
51 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
52 | OBJS = $(SRCFILES:.cc=.o)
|
---|
53 | OBJS1 = merpp.o
|
---|
54 | OBJS2 = readraw.o
|
---|
55 |
|
---|
56 | ############################################################
|
---|
57 |
|
---|
58 | all: rmlib $(PROGRAM1) $(PROGRAM2) $(SOLIB)
|
---|
59 |
|
---|
60 | $(PROGRAM1): $(MARS_LIBB) $(OBJS1) $(OBJS) MCint.o
|
---|
61 | @echo " Linking $(PROGRAM1) ..."
|
---|
62 | $(CXX) $(CXXFLAGS) $(OBJS1) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
|
---|
63 |
|
---|
64 | $(PROGRAM2): $(MARS_LIBB) $(OBJS2) $(OBJS) MCint.o
|
---|
65 | @echo " Linking $(PROGRAM2) ..."
|
---|
66 | $(CXX) $(CXXFLAGS) $(OBJS2) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
|
---|
67 |
|
---|
68 | $(SOLIB): $(MARS_LIBB) $(OBJS) MCint.o
|
---|
69 | @echo " Linking $(SOLIB) ..."
|
---|
70 | $(CXX) $(CXXFLAGS) -shared $(OBJS2) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
|
---|
71 | mv mars.so lib
|
---|
72 |
|
---|
73 | libmbase.a:
|
---|
74 | @echo " Creating libmbase.a:"
|
---|
75 | (cd mbase; make; cd ..; mv mbase/libmbase.a lib)
|
---|
76 |
|
---|
77 | libmraw.a:
|
---|
78 | @echo " Creating libmraw.a:"
|
---|
79 | (cd mraw; make; cd ..; mv mraw/libmraw.a lib)
|
---|
80 |
|
---|
81 | libmocttest.a:
|
---|
82 | @echo " Creating libmocttest.a:"
|
---|
83 | (cd mocttest; make; cd .., mv mocttest/libmocttest.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 |
|
---|