source: trunk/MagicSoft/Mars/Makefile@ 3847

Last change on this file since 3847 was 3806, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 3.6 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 star status mars mona
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 mcalib \
51 mpedestal \
52 mfileio \
53 mreflector \
54 mgeom \
55 msql \
56 mimage \
57 mmontecarlo \
58 mmc \
59 mraw \
60 mcamera \
61 mpointing \
62 mreport \
63 mgui \
64 mranforest \
65 mhistmc \
66 mjobs \
67 mtools
68
69# monline \
70
71#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
72LIBRARIES = $(SUBDIRS:=.a)
73MRPROPERS = $(SUBDIRS:=.mrproper)
74CLEANERS = $(SUBDIRS:=.clean)
75LIBS = $(SOLIB)
76
77#------------------------------------------------------------------------------
78
79.SUFFIXES: .c .cc .h .o
80
81SRCFILES =
82
83SRCS = $(SRCFILES)
84HEADERS = $(SRCFILES:.cc=.h)
85OBJS = $(SRCFILES:.cc=.o) MCint.o
86
87############################################################
88all: rmlib $(SOLIB) $(PROGRAMS)
89 @echo " Done. "
90 @echo " "
91
92static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
93static: rmlib $(LIBRARIES) $(PROGRAMS)
94 @echo " Done. "
95 @echo " "
96
97include Makefile.rules
98
99#
100# Use $(CXX) -v ... for a more verbose output
101#
102# ROOTGLIBS must be there - why? How can I link the libraries?
103$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
104 @echo " Linking $(SOLIB) ..."
105 $(CXX) $(CXXFLAGS) $(DYNLIB) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
106# $(CXX) $(CXXFLAGS) $(DYNLIB) $(OBJS) -Wl,--export-dynamic -Llib $(LIBRARIES:%.a=-l%) -o $@
107
108$(PROGRAMS): $(LIBS) $(PROGRAMS:=.o)
109 @echo " Linking $@ ..."
110 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(LIBS) $@.o $(MARS_LIB) -o $@
111
112# FOR CONVINIENCE CREATE Dep-file first!
113$(LIBRARIES):
114 @echo " Creating lib$@:"
115 (cd $*; $(MAKE) -f Makefile; cd ..; mv $*/$@ lib/lib$@)
116
117$(MRPROPERS):
118 @echo " Doing Mr.Proper in $(@:.mrproper=)"
119 (cd $(@:.mrproper=); ($(MAKE) -f Makefile mrproper > /dev/null); cd ..;)
120
121$(CLEANERS):
122 @echo "Cleaning $(@:.clean=):"
123 (cd $(@:.clean=); $(MAKE) -f Makefile clean; cd ..;)
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.