source: tags/Mars-V0.9.6/Makefile@ 10107

Last change on this file since 10107 was 7491, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 3.9 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
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
127condor: $(CONDOR)
128
129dox: $(SOLIB)
130 @echo
131 @echo " Creating html documentation and logfile dohtml.log..."
132 rm -f dohtml.log
133 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
134 @echo " done."
135 @echo
136
137#clean: rmcint rmobjs rmdep rmcore rmlib
138
139mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
140 @echo " Done."
141 @echo " "
142
143tar: mrproper
144 @echo "Making tar-file"
145 root -b -q -l -n tar.C
146# @tar cvf ../mars.tar --exclude=Root .rootrc *
147# @gzip -9 ../mars.tar
148
149#Makefile.depend:
150# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
151# echo " Generating dependancies into Makefile.depend" && \
152# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
153# echo " ") || find -maxdepth 0 -true > /dev/null
154#
155#depend: Makefile.depend
156
157# @endcode
Note: See TracBrowser for help on using the repository browser.