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