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