source: trunk/MagicSoft/Mars/Makefile@ 3032

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