source: tags/Mars-V0.9.4.1/Makefile@ 14278

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