source: trunk/MagicSoft/Mars/Makefile@ 5712

Last change on this file since 5712 was 5712, checked in by gaug, 20 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 readraw merpp mars mona showlog callisto showplot star \
23 macros/calibration
24SOLIB = libmars.so
25CINT = M
26
27#
28# connect the include files defined in the config.mk file
29#
30# WARNING: the result (whether the linkage works or not) depends on the
31# order of the libraries. It seems, that the most base library
32# must be the last one
33#
34
35#
36# ----->>> mars libraries
37#
38SUBDIRS = mbase \
39 mastro \
40 mmain \
41 mfbase \
42 mfilter \
43 mdata \
44 mhbase \
45 mhvstime \
46 mhist \
47 manalysis \
48 msignal \
49 mbadpixels \
50 mhcalib \
51 mhflux \
52 mcalib \
53 mpedestal \
54 mfileio \
55 mreflector \
56 mgeom \
57 msql \
58 mimage \
59 mmontecarlo \
60 mhft \
61 mmc \
62 mraw \
63 mcamera \
64 mtrigger \
65 mpointing \
66 mreport \
67 mgui \
68 mranforest \
69 mhistmc \
70 mjobs \
71 mtools \
72 mstarcam
73
74#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
75LIBRARIES = $(SUBDIRS:=.a)
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
127dox: $(SOLIB)
128 @echo
129 @echo " Creating html documentation and logfile dohtml.log..."
130 rm -f dohtml.log
131 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
132 @echo " done."
133 @echo
134
135#clean: rmcint rmobjs rmdep rmcore rmlib
136
137mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
138 @echo " Done."
139 @echo " "
140
141tar: mrproper
142 @echo "Making tar-file"
143 root -b -q -l -n tar.C
144# @tar cvf ../mars.tar --exclude=Root .rootrc *
145# @gzip -9 ../mars.tar
146
147#Makefile.depend:
148# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
149# echo " Generating dependancies into Makefile.depend" && \
150# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
151# echo " ") || find -maxdepth 0 -true > /dev/null
152#
153#depend: Makefile.depend
154
155# @endcode
Note: See TracBrowser for help on using the repository browser.