source: tags/Mars-V0.8.4/Makefile@ 9818

Last change on this file since 9818 was 3394, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 3.6 KB
Line 
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#
17include Makefile.conf.$(OSTYPE)
18include Makefile.conf.general
19
20#
21
22#PROGRAMS = readraw merpp mars test mona status
23PROGRAMS = readdaq readraw merpp star status mars mona
24SOLIB = libmars.so
25CINT = M
26
27#
28# connect the include files defined in the config.mk file
29#
30# WARNING: the result (whether the linkage works or not) depends on the
31# order of the libraries. It seems, that the most base library
32# must be the last one
33#
34
35#
36# ----->>> mars libraries
37#
38SUBDIRS = mbase \
39 mastro \
40 mmain \
41 mfbase \
42 mfilter \
43 mdata \
44 mhbase \
45 mhvstime \
46 mhist \
47 manalysis \
48 msignal \
49 mbadpixels \
50 mcalib \
51 mfileio \
52 mreflector \
53 mgeom \
54 msql \
55 mimage \
56 mmontecarlo \
57 mmc \
58 mraw \
59 mcamera \
60 mpointing \
61 mreport \
62 mgui \
63 mranforest \
64 mhistmc \
65 mjobs \
66 mtools
67
68# monline \
69
70#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
71LIBRARIES = $(SUBDIRS:=.a)
72MRPROPERS = $(SUBDIRS:=.mrproper)
73CLEANERS = $(SUBDIRS:=.clean)
74LIBS = $(SOLIB)
75
76#------------------------------------------------------------------------------
77
78.SUFFIXES: .c .cc .h .o
79
80SRCFILES =
81
82SRCS = $(SRCFILES)
83HEADERS = $(SRCFILES:.cc=.h)
84OBJS = $(SRCFILES:.cc=.o) MCint.o
85
86############################################################
87all: rmlib $(SOLIB) $(PROGRAMS)
88 @echo " Done. "
89 @echo " "
90
91static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
92static: rmlib $(LIBRARIES) $(PROGRAMS)
93 @echo " Done. "
94 @echo " "
95
96include Makefile.rules
97
98#
99# Use $(CXX) -v ... for a more verbose output
100#
101# ROOTGLIBS must be there - why? How can I link the libraries?
102$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
103 @echo " Linking $(SOLIB) ..."
104 $(CXX) $(CXXFLAGS) $(DYNLIB) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
105# $(CXX) $(CXXFLAGS) $(DYNLIB) $(OBJS) -Wl,--export-dynamic -Llib $(LIBRARIES:%.a=-l%) -o $@
106
107$(PROGRAMS): $(LIBS) $(PROGRAMS:=.o)
108 @echo " Linking $@ ..."
109 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(LIBS) $@.o $(MARS_LIB) -o $@
110
111# FOR CONVINIENCE CREATE Dep-file first!
112$(LIBRARIES):
113 @echo " Creating lib$@:"
114 (cd $*; $(MAKE) -f Makefile; cd ..; mv $*/$@ lib/lib$@)
115
116$(MRPROPERS):
117 @echo " Doing Mr.Proper in $(@:.mrproper=)"
118 (cd $(@:.mrproper=); ($(MAKE) -f Makefile mrproper > /dev/null); cd ..;)
119
120$(CLEANERS):
121 @echo "Cleaning $(@:.clean=):"
122 (cd $(@:.clean=); $(MAKE) -f Makefile clean; cd ..;)
123
124dox: $(SOLIB)
125 @echo
126 @echo " Creating html documentation and logfile dohtml.log..."
127 rm -f dohtml.log
128 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
129 @echo " done."
130 @echo
131
132#clean: rmcint rmobjs rmdep rmcore rmlib
133
134mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
135 @echo " Done."
136 @echo " "
137
138tar: mrproper
139 @echo "Making tar-file"
140 root -b -q -l -n tar.C
141# @tar cvf ../mars.tar --exclude=Root .rootrc *
142# @gzip -9 ../mars.tar
143
144#Makefile.depend:
145# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
146# echo " Generating dependancies into Makefile.depend" && \
147# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
148# echo " ") || find -maxdepth 0 -true > /dev/null
149#
150#depend: Makefile.depend
151
152# @endcode
Note: See TracBrowser for help on using the repository browser.