source: tags/Mars-V0.8.1/Makefile@ 18018

Last change on this file since 18018 was 2263, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 3.2 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
22PROGRAMS = readraw merpp mars
23SOLIB = mars.so
24CINT = M
25
26#
27# connect the include files defined in the config.mk file
28#
29# WARNING: the result (whether the linkage works or not) depends on the
30# order of the libraries. It seems, that the most base library
31# must be the last one
32#
33
34#
35# ----->>> mars libraries
36#
37SUBDIRS = mbase \
38 mmain \
39 meventdisp \
40 mfileio \
41 mreflector \
42 mhist \
43 mdatacheck \
44 mgeom \
45 mimage \
46 manalysis \
47 mmontecarlo \
48 mmc \
49 mraw \
50 mgui \
51 mranforest \
52 mdata \
53 mhistmc \
54 mfilter \
55 mtools
56
57LIBRARIES = $(SUBDIRS:=.a)
58MRPROPERS = $(SUBDIRS:=.mrproper)
59CLEANERS = $(SUBDIRS:=.clean)
60
61#------------------------------------------------------------------------------
62
63.SUFFIXES: .c .cc .h .o
64
65SRCFILES =
66
67SRCS = $(SRCFILES)
68HEADERS = $(SRCFILES:.cc=.h)
69OBJS = $(SRCFILES:.cc=.o)
70
71############################################################
72
73all: rmlib $(PROGRAMS) $(SOLIB)
74 @echo " Done. "
75 @echo " "
76
77# Use $(CXX) -v ... for a more verbose output
78#
79#
80#$(MARS_LIB)
81$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
82 @echo " Linking $(SOLIB) ..."
83 $(CXX) $(DYNLIB) $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
84 mv mars.so lib
85
86$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o $(PROGRAMS:=.o)
87 @echo " Linking $@ ..."
88 $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
89
90#
91# We could link mars.so instead of all libraries. This would need
92# some MBs less space on the HD. But this means, that the Shared
93# Library Path in your system must be set properly to be able to start
94# 'mars'
95#
96#$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(SOLIB) MCint.o $(PROGRAMS:=.o)
97# @echo " Linking $@ ..."
98# $(CXX) $(CXXFLAGS) $@.o $(OBJS) lib/$(SOLIB) MCint.o $(ROOTGLIBS) -o $@
99
100#
101# For later use
102#
103#$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o $(PROGRAMS:=.o)
104# @echo " Linking $@ ..."
105# $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) -L/usr/X11R6/lib -lX11 -lXpm MCint.o $(ROOTGLIBS) -o $@
106#
107#$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
108# @echo " Linking $(SOLIB) ..."
109# $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
110# mv mars.so lib
111
112$(LIBRARIES):
113 @echo " Creating lib$@:"
114 (cd $*; make; cd ..; mv $*/$@ lib/lib$@)
115
116$(MRPROPERS):
117 @echo " Doing Mr.Proper in $(@:.mrproper=)"
118 (cd $(@:.mrproper=); (make mrproper > /dev/null); cd ..;)
119
120$(CLEANERS):
121 @echo "Cleaning $(@:.clean=):"
122 (cd $(@:.clean=); make clean; cd ..;)
123
124dox: $(SOLIB)
125 @echo " Creating html documentation:"
126 root -b -q dohtml.C
127
128include Makefile.rules
129
130clean: rmcint rmobjs rmcore rmlib
131
132mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
133 @echo " Done."
134 @echo " "
135
136tar: mrproper
137 @echo "Making tar-file"
138 @root -b -q -l -n tar.C
139# @tar cvf ../mars.tar --exclude=Root .rootrc *
140# @gzip -9 ../mars.tar
141
142# @endcode
Note: See TracBrowser for help on using the repository browser.