source: tags/Mars-V1.2/Makefile@ 18892

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