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
|
---|
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 | MGDataCheckMain.cc \
|
---|
56 | MGMonteCarloMain.cc \
|
---|
57 | MGPrototyp.cc
|
---|
58 |
|
---|
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 | -f../Makefile.depend 2> kk.kk ; cat kk.kk
|
---|
71 |
|
---|
72 | $(LIB): $(OBJS) GuiCint.o
|
---|
73 | @echo " - Building Library $(LIB) ... "
|
---|
74 | $(AR) $(LIB) *.o
|
---|
75 |
|
---|
76 | GuiCint.cc: $(HEADERS)
|
---|
77 | @echo
|
---|
78 | @echo " - Generating dictionary GuiCint.cc ..."
|
---|
79 |
|
---|
80 | $(ROOTSYS)/bin/rootcint -f GuiCint.cc \
|
---|
81 | -c $(INCLUDES) $(HEADERS) GuiIncl.h GuiLinkDef.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 GuiCint.*
|
---|
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 |
|
---|