source: trunk/MagicSoft/Mars/Makefile@ 3130

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