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 | INCLUDEMK = ../Makefile.conf.${OSTYPE}
|
---|
18 | include ${INCLUDEMK}
|
---|
19 |
|
---|
20 | # @endcode
|
---|
21 |
|
---|
22 | # @code
|
---|
23 |
|
---|
24 | LIB = libmbase.a
|
---|
25 |
|
---|
26 | #
|
---|
27 | # connect the include files defined in the config.mk file
|
---|
28 | #
|
---|
29 | INCLUDES = -I./
|
---|
30 |
|
---|
31 | #
|
---|
32 | # ----->>> root libraries
|
---|
33 | #
|
---|
34 |
|
---|
35 | ROOTLIBS = `root-config --libs`
|
---|
36 | ROOTGLIBS = `root-config --glibs`
|
---|
37 | ROOTCFLAGS = `root-config --cflags`
|
---|
38 |
|
---|
39 | #
|
---|
40 | # compiler flags
|
---|
41 | #
|
---|
42 |
|
---|
43 | CXXFLAGS = $(ROOTCFLAGS) $(INCLUDES) $(OPTIM) $(DEBUG)
|
---|
44 | CFLAGS = $(CXXFLAGS)
|
---|
45 | FFLAGS = $(CXXFLAGS)
|
---|
46 |
|
---|
47 | #------------------------------------------------------------------------------
|
---|
48 |
|
---|
49 | #.SILENT:
|
---|
50 |
|
---|
51 | .SUFFIXES: .c .cc .cxx .h .hxx .o
|
---|
52 |
|
---|
53 |
|
---|
54 | SRCFILES = MTask.cc \
|
---|
55 | MTaskList.cc \
|
---|
56 | MParContainer.cc \
|
---|
57 | MParList.cc \
|
---|
58 | MParRead.cc \
|
---|
59 | MParWrite.cc \
|
---|
60 | MTime.cc \
|
---|
61 | MInputStreamID.cc \
|
---|
62 | MObjBuffer.cc \
|
---|
63 | MFile.cc \
|
---|
64 | MFileDescr.cc \
|
---|
65 | MEvtLoop.cc
|
---|
66 |
|
---|
67 | SRCS = $(SRCFILES)
|
---|
68 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
69 | OBJS = $(SRCFILES:.cc=.o)
|
---|
70 |
|
---|
71 | ############################################################
|
---|
72 |
|
---|
73 | all: $(LIB)
|
---|
74 |
|
---|
75 | depend:
|
---|
76 | @makedepend $(SRCS) $(INCLUDES) $(ROOTCFLAGS) \
|
---|
77 | -fMakefile.depend 2> kk.kk ; cat kk.kk
|
---|
78 |
|
---|
79 | $(LIB): $(OBJS) BaseCint.o
|
---|
80 | @echo "Building Library $(LIB) ... "
|
---|
81 | @ar -r $(LIB) *.o
|
---|
82 |
|
---|
83 | BaseCint.cc: $(HEADERS)
|
---|
84 | @echo
|
---|
85 | @echo "Generating dictionary BaseCint.cc ..."
|
---|
86 |
|
---|
87 | @$(ROOTSYS)/bin/rootcint -f BaseCint.cc \
|
---|
88 | -c $(INCLUDES) $(HEADERS) BaseLinkDef.h
|
---|
89 |
|
---|
90 | .cxx.o:
|
---|
91 | @echo "Compiling " $<
|
---|
92 | $(CXX) $(CXXFLAGS) -c $< -o $@
|
---|
93 |
|
---|
94 | .cc.o:
|
---|
95 | @echo "Compiling " $<
|
---|
96 | $(CXX) $(CXXFLAGS) -c $< -o $@
|
---|
97 |
|
---|
98 | .c.o:
|
---|
99 | @echo "Compiling " $<
|
---|
100 | $(CC) $(CFLAGS) -c $< -o $@
|
---|
101 |
|
---|
102 | #
|
---|
103 | # The cleaning facility
|
---|
104 | #
|
---|
105 |
|
---|
106 | rmlib:
|
---|
107 | @echo "Removing libraries..."
|
---|
108 | @rm -f lib*.a
|
---|
109 |
|
---|
110 | rmcint:
|
---|
111 | @echo "Removing cint-stuff..."
|
---|
112 | @rm -f BaseCint.*
|
---|
113 |
|
---|
114 | rmobjs:
|
---|
115 | @echo "Removing object files..."
|
---|
116 | @rm -f *.o
|
---|
117 |
|
---|
118 | rmbin:
|
---|
119 | @echo "Removing binary files..."
|
---|
120 | @rm -f core
|
---|
121 |
|
---|
122 |
|
---|
123 | clean: rmlib rmcint rmobjs rmbin
|
---|
124 |
|
---|
125 | mrproper: clean
|
---|
126 | @echo "Removing *~ kk.kk html/..."
|
---|
127 | @rm -f *~ kk.kk
|
---|
128 |
|
---|
129 | cflags:
|
---|
130 | @echo $(INCLUDES) $(CXXFLAGS)
|
---|
131 |
|
---|
132 | # @endcode
|
---|
133 |
|
---|