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 = libmocttest.a
|
---|
25 |
|
---|
26 | #
|
---|
27 | # connect the include files defined in the config.mk file
|
---|
28 | #
|
---|
29 | INCLUDES = -I./ -I../ -I../mbase/ -I../mrootformat/
|
---|
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 = MGOctMain.cc \
|
---|
55 | MOctTest.cc \
|
---|
56 | MHistosAdc.cc \
|
---|
57 | MAdcSpect.cc \
|
---|
58 | MShowSpect.cc \
|
---|
59 | MGDisplayAdc.cc
|
---|
60 |
|
---|
61 | SRCS = $(SRCFILES)
|
---|
62 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
63 | OBJS = $(SRCFILES:.cc=.o)
|
---|
64 |
|
---|
65 | ############################################################
|
---|
66 |
|
---|
67 | all: $(LIB)
|
---|
68 |
|
---|
69 | depend:
|
---|
70 | @makedepend $(SRCS) $(INCLUDES) $(ROOTCFLAGS) \
|
---|
71 | -fMakefile.depend 2> kk.kk ; cat kk.kk
|
---|
72 |
|
---|
73 | $(LIB): $(OBJS) OcttestCint.o
|
---|
74 | @echo "Building Library $(LIB) ... "
|
---|
75 | @ar -r $(LIB) *.o
|
---|
76 |
|
---|
77 | OcttestCint.cc: $(HEADERS)
|
---|
78 | @echo
|
---|
79 | @echo "Generating dictionary OcttestCint.cc ..."
|
---|
80 |
|
---|
81 | @$(ROOTSYS)/bin/rootcint -f OcttestCint.cc \
|
---|
82 | -c $(INCLUDES) $(HEADERS) BaseLinkDef.h
|
---|
83 |
|
---|
84 | .cxx.o:
|
---|
85 | @echo "Compiling " $<
|
---|
86 | $(CXX) $(CXXFLAGS) -c $< -o $@
|
---|
87 |
|
---|
88 | .cc.o:
|
---|
89 | @echo "Compiling " $<
|
---|
90 | $(CXX) $(CXXFLAGS) -c $< -o $@
|
---|
91 |
|
---|
92 | .c.o:
|
---|
93 | @echo "Compiling " $<
|
---|
94 | $(CC) $(CFLAGS) -c $< -o $@
|
---|
95 |
|
---|
96 | #
|
---|
97 | # The cleaning facility
|
---|
98 | #
|
---|
99 |
|
---|
100 | rmlib:
|
---|
101 | @echo "Removing libraries..."
|
---|
102 | @rm -f lib*.a
|
---|
103 |
|
---|
104 | rmcint:
|
---|
105 | @echo "Removing cint-stuff..."
|
---|
106 | @rm -f OcttestCint.*
|
---|
107 |
|
---|
108 | rmobjs:
|
---|
109 | @echo "Removing object files..."
|
---|
110 | @rm -f *.o
|
---|
111 |
|
---|
112 | rmbin:
|
---|
113 | @echo "Removing binary files..."
|
---|
114 | @rm -f core
|
---|
115 |
|
---|
116 |
|
---|
117 | clean: rmlib rmcint rmobjs rmbin
|
---|
118 |
|
---|
119 | mrproper: clean
|
---|
120 | @echo "Removing *~ kk.kk html/..."
|
---|
121 | @rm -f *~ kk.kk
|
---|
122 |
|
---|
123 | cflags:
|
---|
124 | @echo $(INCLUDES) $(CXXFLAGS)
|
---|
125 |
|
---|
126 | # @endcode
|
---|
127 |
|
---|
128 |
|
---|
129 |
|
---|
130 |
|
---|