source: tags/Mars-V0.9.3/Makefile@ 12696

Last change on this file since 12696 was 7094, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 3.8 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 mtools \
69 mmuon
70
71#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
72LIBRARIES = $(SUBDIRS:=.a)
73MRPROPERS = $(SUBDIRS:=.mrproper)
74CLEANERS = $(SUBDIRS:=.clean)
75LIBS = $(SOLIB)
76
77#------------------------------------------------------------------------------
78.SUFFIXES: .c .cc .h .o
79
80SRCFILES =
81
82############################################################
83all: $(SOLIB) $(PROGRAMS)
84 @echo " Done. "
85 @echo " "
86
87static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
88#static: rmlib $(LIBRARIES) $(PROGRAMS)
89static: $(LIBRARIES) $(PROGRAMS)
90 @echo " Done. "
91 @echo " "
92
93include Makefile.rules
94
95#
96# Use $(CXX) -v ... for a more verbose output
97#
98# ROOTGLIBS must be there - why? How can I link the libraries?
99$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
100 @echo " Linking shared object $(SOLIB) ..."
101 $(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
102
103# This is a special workaround to create the shared object (bundle, plugin)
104# for root and the dynlib (to be linked with the executable) on Mac OSX
105ifneq ($(OSTYPE),darwin)
106$(PROGRAMS): $(SOLIB) $(PROGRAMS:=.o)
107 @echo " Linking $@ ..."
108 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o $(MARS_LIB) -o $@
109
110# Use this to link the programs statically - for gprof
111#$(PROGRAMS): $(OBJS) $(HEADERS) $(PROGRAMS:=.o)
112# @echo " Linking $@ ..."
113# $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(OBJS) $(SUBDIRS:=/*.o) $@.o $(MARS_LIB) -o $@
114else
115$(DYLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
116 @echo " Linking dylib $(DYLIB) ..."
117 $(CXX) $(CXXFLAGS) $(DYFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
118
119$(PROGRAMS): $(DYLIB) $(PROGRAMS:=.o)
120 @echo " Linking mac executable $@ ..."
121 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(DYLIB) $@.o $(MARS_LIB) -o $@
122endif
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.