source: tags/Mars-V1.0/Makefile@ 14479

Last change on this file since 14479 was 8154, 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 mextralgo \
48 msignal \
49 mbadpixels \
50 mhcalib \
51 mhflux \
52 mcalib \
53 mpedestal \
54 mfileio \
55 mreflector \
56 mgeom \
57 msql \
58 mimage \
59 mhft \
60 mmc \
61 mraw \
62 mcamera \
63 mtrigger \
64 mpointing \
65 mreport \
66 mgui \
67 mranforest \
68 mjobs \
69 mjoptim \
70 mjtrain \
71 mtools \
72 mmuon
73
74#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
75LIBRARIES = $(SUBDIRS:=.a)
76CONDOR = $(SUBDIRS:=.condor)
77MRPROPERS = $(SUBDIRS:=.mrproper)
78CLEANERS = $(SUBDIRS:=.clean)
79LIBS = $(SOLIB)
80
81#------------------------------------------------------------------------------
82.SUFFIXES: .c .cc .h .o
83
84SRCFILES =
85
86############################################################
87all: $(SOLIB) $(PROGRAMS)
88 @echo " Done. "
89 @echo " "
90
91static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
92#static: rmlib $(LIBRARIES) $(PROGRAMS)
93static: $(LIBRARIES) $(PROGRAMS)
94 @echo " Done. "
95 @echo " "
96
97include Makefile.rules
98
99#
100# Use $(CXX) -v ... for a more verbose output
101#
102# ROOTGLIBS must be there - why? How can I link the libraries?
103$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
104 @echo " Linking shared object $(SOLIB) ..."
105 $(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
106
107# This is a special workaround to create the shared object (bundle, plugin)
108# for root and the dynlib (to be linked with the executable) on Mac OSX
109ifneq ($(OSTYPE),darwin)
110$(PROGRAMS): $(SOLIB) $(PROGRAMS:=.o)
111 @echo " Linking $@ ..."
112 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o $(MARS_LIB) -o $@
113
114# Use this to link the programs statically - for gprof
115#$(PROGRAMS): $(OBJS) $(HEADERS) $(PROGRAMS:=.o)
116# @echo " Linking $@ ..."
117# $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(OBJS) $(SUBDIRS:=/*.o) $@.o $(MARS_LIB) -o $@
118else
119$(DYLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
120 @echo " Linking dylib $(DYLIB) ..."
121 $(CXX) $(CXXFLAGS) $(DYFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
122
123$(PROGRAMS): $(DYLIB) $(PROGRAMS:=.o)
124 @echo " Linking mac executable $@ ..."
125 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(DYLIB) $@.o $(MARS_LIB) -o $@
126endif
127
128rmcondor:
129 rm -f .makecondor.log
130
131condor: rmcondor $(CONDOR)
132 echo Waiting for jobs to finish...
133 condor_wait .makecondor.log
134 rm .makecondor.log
135 make -j2 $(PROGRAMS)
136# find -name "*/.makecondor.*"
137# find -maxdepth 2 -name ".makecondor.*" -exec echo {}\\\; cat {}\\\; echo {}\\\; \;
138
139dox: $(SOLIB)
140 @echo
141 @echo " Creating html documentation and logfile dohtml.log..."
142 rm -f dohtml.log
143 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
144 @echo " done."
145 @echo
146
147#clean: rmcint rmobjs rmdep rmcore rmlib
148
149mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
150 @echo " Done."
151 @echo " "
152
153tar: mrproper
154 @echo "Making tar-file"
155 root -b -q -l -n tar.C
156# @tar cvf ../mars.tar --exclude=Root .rootrc *
157# @gzip -9 ../mars.tar
158
159#Makefile.depend:
160# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
161# echo " Generating dependancies into Makefile.depend" && \
162# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
163# echo " ") || find -maxdepth 0 -true > /dev/null
164#
165#depend: Makefile.depend
166
167# @endcode
Note: See TracBrowser for help on using the repository browser.