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 | PROGRAM = mars
|
---|
25 | SOLIB = mars.so
|
---|
26 |
|
---|
27 | #
|
---|
28 | # connect the include files defined in the config.mk file
|
---|
29 | #
|
---|
30 | INCLUDES = -I./ -I$(INCLUDE_MBASE) -I./mrootformat/ -I./mocttest/
|
---|
31 |
|
---|
32 | #
|
---|
33 | # ----->>> mars libraries
|
---|
34 | #
|
---|
35 |
|
---|
36 | MARS_LIB = -L./ -lmocttest -lmrootformat -lmbase
|
---|
37 | MARS_LIBB = libmbase.a libmocttest.a libmrootformat.a
|
---|
38 |
|
---|
39 | #------------------------------------------------------------------------------
|
---|
40 |
|
---|
41 | #.SILENT:
|
---|
42 |
|
---|
43 | .SUFFIXES: .c .cc .cxx .h .hxx .o
|
---|
44 |
|
---|
45 |
|
---|
46 | SRCFILES =
|
---|
47 |
|
---|
48 | SRCS = $(SRCFILES)
|
---|
49 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
50 | OBJS = $(SRCFILES:.cc=.o) mars.o
|
---|
51 |
|
---|
52 | ############################################################
|
---|
53 |
|
---|
54 | all: rmlib $(PROGRAM) $(SOLIB)
|
---|
55 |
|
---|
56 | $(PROGRAM): $(MARS_LIBB) $(OBJS) MCint.o
|
---|
57 | @echo "Linking $(PROGRAM) ..."
|
---|
58 | $(CXX) $(CXXFLAGS) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
|
---|
59 |
|
---|
60 | $(SOLIB): $(MARS_LIBB) $(OBJS) MCint.o
|
---|
61 | @echo "Linking $(SOLIB) ..."
|
---|
62 | $(CXX) $(CXXFLAGS) -shared $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
|
---|
63 |
|
---|
64 | libmbase.a:
|
---|
65 | @echo "Creating libmbase.a ..."
|
---|
66 | (cd mbase; make; cp libmbase.a ../libmbase.a; cd ..)
|
---|
67 |
|
---|
68 | libmocttest.a:
|
---|
69 | @echo "Creating libmocttest.a ..."
|
---|
70 | (cd mocttest; make; cp libmocttest.a ../libmocttest.a; cd ..)
|
---|
71 |
|
---|
72 |
|
---|
73 | libmrootformat.a:
|
---|
74 | @echo "Creating libmrootformat.a ..."
|
---|
75 | (cd mrootformat; make; cp libmrootformat.a ../libmrootformat.a; cd ..)
|
---|
76 |
|
---|
77 | MCint.cc: $(HEADERS)
|
---|
78 | @echo "Generating dictionary MCint.cc..."
|
---|
79 | @$(ROOTSYS)/bin/rootcint -f MCint.cc \
|
---|
80 | -c $(INCLUDES) $(HEADERS) LinkDef.h
|
---|
81 |
|
---|
82 | include Makefile.rules
|
---|
83 |
|
---|
84 | clean: rmlib rmcint rmobjs rmcore rmbin
|
---|
85 |
|
---|
86 | # @endcode
|
---|
87 |
|
---|