source: tags/Mars-V0.8.3/Makefile

Last change on this file was 2584, checked in by tbretz, 21 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
22#PROGRAMS = readraw merpp mars test mona status
23PROGRAMS = readraw readdaq 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 mhist \
43 manalysis \
44 mfileio \
45 mreflector \
46 mgeom \
47 mimage \
48 mmontecarlo \
49 mmc \
50 mraw \
51 mcamera \
52 mreport \
53 mgui \
54 mranforest \
55 mhistmc \
56 mtools
57
58# monline \
59
60#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
61LIBRARIES = $(SUBDIRS:=.a)
62MRPROPERS = $(SUBDIRS:=.mrproper)
63CLEANERS = $(SUBDIRS:=.clean)
64
65#------------------------------------------------------------------------------
66
67.SUFFIXES: .c .cc .h .o
68
69SRCFILES =
70
71SRCS = $(SRCFILES)
72HEADERS = $(SRCFILES:.cc=.h)
73OBJS = $(SRCFILES:.cc=.o)
74
75############################################################
76
77all: rmlib $(PROGRAMS) $(SOLIB)
78 @echo " Done. "
79 @echo " "
80
81include Makefile.rules
82include Makefile.depend
83
84# Use $(CXX) -v ... for a more verbose output
85#
86#
87#$(MARS_LIB)
88$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
89 @echo " Linking $(SOLIB) ..."
90 $(CXX) $(DYNLIB) $(CXXFLAGS) $(OBJS) MCint.o $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
91
92$(PROGRAMS): $(SOLIB) $(PROGRAMS:=.o)
93 @echo " Linking $@ ..."
94 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o $(MARS_LIB) -o $@
95
96#
97# We could link mars.so instead of all libraries. This would need
98# some MBs less space on the HD. But this means, that the Shared
99# Library Path in your system must be set properly to be able to start
100# 'mars'
101#
102#$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(SOLIB) MCint.o $(PROGRAMS:=.o)
103# @echo " Linking $@ ..."
104# $(CXX) $(CXXFLAGS) $@.o $(OBJS) lib/$(SOLIB) MCint.o $(ROOTGLIBS) -o $@
105
106#
107# For later use
108#
109#$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o $(PROGRAMS:=.o)
110# @echo " Linking $@ ..."
111# $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) -L/usr/X11R6/lib -lX11 -lXpm MCint.o $(ROOTGLIBS) -o $@
112#
113#$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
114# @echo " Linking $(SOLIB) ..."
115# $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
116# mv mars.so lib
117
118$(LIBRARIES):
119 @echo " Creating lib$@:"
120 (cd $*; make; cd ..; mv $*/$@ lib/lib$@)
121# (cd $(@:lib/lib%.a=%); make; cd ..; mv $(@:lib/lib%.a=%)/$(@:lib/lib%=%) $@)
122
123$(MRPROPERS):
124 @echo " Doing Mr.Proper in $(@:.mrproper=)"
125 (cd $(@:.mrproper=); (make mrproper > /dev/null); cd ..;)
126
127$(CLEANERS):
128 @echo "Cleaning $(@:.clean=):"
129 (cd $(@:.clean=); make clean; cd ..;)
130
131dox: $(SOLIB)
132 @echo " Creating html documentation:"
133 root -b -q dohtml.C
134
135clean: rmmake rmcint rmobjs rmcore rmlib
136
137mrproper: $(MRPROPERS) rmmake rmbin rmbak rmbakmac rmhtml clean
138 @echo " Done."
139 @echo " "
140
141tar: mrproper
142 @echo "Making tar-file"
143 @root -b -q -l -n tar.C
144# @tar cvf ../mars.tar --exclude=Root .rootrc *
145# @gzip -9 ../mars.tar
146
147Makefile.depend:
148 (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
149 echo " Generating dependancies into Makefile.depend" && \
150 makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
151 echo " ") || find -maxdepth 0 -true > /dev/null
152
153depend: Makefile.depend
154
155# @endcode
Note: See TracBrowser for help on using the repository browser.