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