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