source: tags/Mars-V0.10/Makefile@ 11752

Last change on this file since 11752 was 8032, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 4.2 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#PROGRAMS = readraw merpp mars test mona status
22PROGRAMS = readdaq merpp readraw sinope callisto star ganymed sponde showlog showplot mars mars-config
23SOLIB = libmars.so
24CINT = M
25
26#
27# connect the include files defined in the config.mk file
28#
29# WARNING: the result (whether the linkage works or not) depends on the
30# order of the libraries. It seems, that the most base library
31# must be the last one
32#
33
34#
35# ----->>> mars libraries
36#
37SUBDIRS = mbase \
38 mastro \
39 mmain \
40 mfbase \
41 mfilter \
42 mdata \
43 mhbase \
44 mhvstime \
45 mhist \
46 manalysis \
47 msignal \
48 mbadpixels \
49 mhcalib \
50 mhflux \
51 mcalib \
52 mpedestal \
53 mfileio \
54 mreflector \
55 mgeom \
56 msql \
57 mimage \
58 mhft \
59 mmc \
60 mraw \
61 mcamera \
62 mtrigger \
63 mpointing \
64 mreport \
65 mgui \
66 mranforest \
67 mjobs \
68 mjoptim \
69 mjtrain \
70 mtools \
71 mmuon
72
73#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
74LIBRARIES = $(SUBDIRS:=.a)
75CONDOR = $(SUBDIRS:=.condor)
76MRPROPERS = $(SUBDIRS:=.mrproper)
77CLEANERS = $(SUBDIRS:=.clean)
78LIBS = $(SOLIB)
79
80#------------------------------------------------------------------------------
81.SUFFIXES: .c .cc .h .o
82
83SRCFILES =
84
85############################################################
86all: $(SOLIB) $(PROGRAMS)
87 @echo " Done. "
88 @echo " "
89
90static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
91#static: rmlib $(LIBRARIES) $(PROGRAMS)
92static: $(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 shared object $(SOLIB) ..."
104 $(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
105
106# This is a special workaround to create the shared object (bundle, plugin)
107# for root and the dynlib (to be linked with the executable) on Mac OSX
108ifneq ($(OSTYPE),darwin)
109$(PROGRAMS): $(SOLIB) $(PROGRAMS:=.o)
110 @echo " Linking $@ ..."
111 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o $(MARS_LIB) -o $@
112
113# Use this to link the programs statically - for gprof
114#$(PROGRAMS): $(OBJS) $(HEADERS) $(PROGRAMS:=.o)
115# @echo " Linking $@ ..."
116# $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(OBJS) $(SUBDIRS:=/*.o) $@.o $(MARS_LIB) -o $@
117else
118$(DYLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
119 @echo " Linking dylib $(DYLIB) ..."
120 $(CXX) $(CXXFLAGS) $(DYFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
121
122$(PROGRAMS): $(DYLIB) $(PROGRAMS:=.o)
123 @echo " Linking mac executable $@ ..."
124 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(DYLIB) $@.o $(MARS_LIB) -o $@
125endif
126
127rmcondor:
128 rm -f .makecondor.log
129
130condor: rmcondor $(CONDOR)
131 echo Waiting for jobs to finish...
132 condor_wait .makecondor.log
133 rm .makecondor.log
134 make -j2 $(PROGRAMS)
135# find -name "*/.makecondor.*"
136# find -maxdepth 2 -name ".makecondor.*" -exec echo {}\\\; cat {}\\\; echo {}\\\; \;
137
138dox: $(SOLIB)
139 @echo
140 @echo " Creating html documentation and logfile dohtml.log..."
141 rm -f dohtml.log
142 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
143 @echo " done."
144 @echo
145
146#clean: rmcint rmobjs rmdep rmcore rmlib
147
148mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
149 @echo " Done."
150 @echo " "
151
152tar: mrproper
153 @echo "Making tar-file"
154 root -b -q -l -n tar.C
155# @tar cvf ../mars.tar --exclude=Root .rootrc *
156# @gzip -9 ../mars.tar
157
158#Makefile.depend:
159# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
160# echo " Generating dependancies into Makefile.depend" && \
161# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
162# echo " ") || find -maxdepth 0 -true > /dev/null
163#
164#depend: Makefile.depend
165
166# @endcode
Note: See TracBrowser for help on using the repository browser.