source: tags/Mars-V0.8.6/Makefile@ 14346

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