source: trunk/MagicSoft/Mars/Makefile@ 6070

Last change on this file since 6070 was 5717, 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 readraw merpp mars mona showlog callisto showplot star
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 mmontecarlo \
59 mhft \
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.