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