source: trunk/MagicSoft/Mars/Makefile@ 3242

Last change on this file since 3242 was 3213, checked in by hbartko, 21 years ago
*** empty log message ***
File size: 3.5 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 mmain \
40 mfilter \
41 mdata \
42 mhbase \
43 mhist \
44 manalysis \
45 msignal \
46 mbadpixels \
47 mcalib \
48 mfileio \
49 mreflector \
50 mgeom \
51 mimage \
52 mmontecarlo \
53 mmc \
54 mraw \
55 mcamera \
56 mpointing \
57 mreport \
58 mgui \
59 mranforest \
60 mhistmc \
61 mjobs \
62 mtools
63
64# monline \
65
66#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
67LIBRARIES = $(SUBDIRS:=.a)
68MRPROPERS = $(SUBDIRS:=.mrproper)
69CLEANERS = $(SUBDIRS:=.clean)
70LIBS = $(SOLIB)
71
72#------------------------------------------------------------------------------
73
74.SUFFIXES: .c .cc .h .o
75
76SRCFILES =
77
78SRCS = $(SRCFILES)
79HEADERS = $(SRCFILES:.cc=.h)
80OBJS = $(SRCFILES:.cc=.o) MCint.o
81
82############################################################
83all: rmlib $(SOLIB) $(PROGRAMS)
84 @echo " Done. "
85 @echo " "
86
87static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
88static: rmlib $(LIBRARIES) $(PROGRAMS)
89 @echo " Done. "
90 @echo " "
91
92include Makefile.rules
93
94#
95# Use $(CXX) -v ... for a more verbose output
96#
97# ROOTGLIBS must be there - why? How can I link the libraries?
98$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
99 @echo " Linking $(SOLIB) ..."
100 $(CXX) $(CXXFLAGS) $(DYNLIB) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
101# $(CXX) $(CXXFLAGS) $(DYNLIB) $(OBJS) -Wl,--export-dynamic -Llib $(LIBRARIES:%.a=-l%) -o $@
102
103$(PROGRAMS): $(LIBS) $(PROGRAMS:=.o)
104 @echo " Linking $@ ..."
105 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(LIBS) $@.o $(MARS_LIB) -o $@
106
107# FOR CONVINIENCE CREATE Dep-file first!
108$(LIBRARIES):
109 @echo " Creating lib$@:"
110 (cd $*; $(MAKE); cd ..; mv $*/$@ lib/lib$@)
111
112$(MRPROPERS):
113 @echo " Doing Mr.Proper in $(@:.mrproper=)"
114 (cd $(@:.mrproper=); ($(MAKE) mrproper > /dev/null); cd ..;)
115
116$(CLEANERS):
117 @echo "Cleaning $(@:.clean=):"
118 (cd $(@:.clean=); $(MAKE) clean; cd ..;)
119
120dox: $(SOLIB)
121 @echo
122 @echo " Creating html documentation and logfile dohtml.log..."
123 rm -f dohtml.log
124 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
125 @echo " done."
126 @echo
127
128#clean: rmcint rmobjs rmdep rmcore rmlib
129
130mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
131 @echo " Done."
132 @echo " "
133
134tar: mrproper
135 @echo "Making tar-file"
136 root -b -q -l -n tar.C
137# @tar cvf ../mars.tar --exclude=Root .rootrc *
138# @gzip -9 ../mars.tar
139
140#Makefile.depend:
141# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
142# echo " Generating dependancies into Makefile.depend" && \
143# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
144# echo " ") || find -maxdepth 0 -true > /dev/null
145#
146#depend: Makefile.depend
147
148# @endcode
Note: See TracBrowser for help on using the repository browser.