source: trunk/MagicSoft/Mars/Makefile@ 1521

Last change on this file since 1521 was 1439, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.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
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 = mmain \
38 mmc \
39 manalysis \
40 mfileio \
41 mbase \
42 meventdisp \
43 mdatacheck \
44 mmontecarlo \
45 mhist \
46 mdata \
47 mfilter \
48 mtools \
49 mgui \
50 mgeom \
51 mraw
52
53LIBRARIES = $(SUBDIRS:=.a)
54MRPROPERS = $(SUBDIRS:=.mrproper)
55CLEANERS = $(SUBDIRS:=.clean)
56
57#------------------------------------------------------------------------------
58
59.SUFFIXES: .c .cc .h .o
60
61SRCFILES =
62
63SRCS = $(SRCFILES)
64HEADERS = $(SRCFILES:.cc=.h)
65OBJS = $(SRCFILES:.cc=.o)
66
67############################################################
68
69all: rmlib $(PROGRAMS) $(SOLIB)
70 @echo " Done. "
71 @echo " "
72
73# Use $(CXX) -v ... for a more verbose output
74#
75#
76#$(MARS_LIB)
77$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
78 @echo " Linking $(SOLIB) ..."
79 $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
80 mv mars.so lib
81
82$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o $(PROGRAMS:=.o)
83 @echo " Linking $@ ..."
84 $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
85
86#
87# We could link mars.so instead of all libraries. This would need
88# some MBs less space on the HD. But this means, that the Shared
89# Library Path in your system must be set properly to be able to start
90# 'mars'
91#
92#$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(SOLIB) MCint.o $(PROGRAMS:=.o)
93# @echo " Linking $@ ..."
94# $(CXX) $(CXXFLAGS) $@.o $(OBJS) lib/$(SOLIB) MCint.o $(ROOTGLIBS) -o $@
95
96$(LIBRARIES):
97 @echo " Creating lib$@:"
98 (cd $*; make; cd ..; mv $*/$@ lib/lib$@)
99
100$(MRPROPERS):
101 @echo " Doing Mr.Proper in $(@:.mrproper=)"
102 (cd $(@:.mrproper=); (make mrproper > /dev/null); cd ..;)
103
104$(CLEANERS):
105 @echo "Cleaning $(@:.clean=):"
106 (cd $(@:.clean=); make clean; cd ..;)
107
108dox: $(SOLIB)
109 @echo " Creating html documentation:"
110 root -b -q dohtml.C
111
112include Makefile.rules
113
114clean: rmcint rmobjs rmcore rmlib
115
116mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
117 @echo " Done."
118 @echo " "
119
120tar: mrproper
121 @echo "Making tar-file"
122 @root -b -q -l -n tar.C
123# @tar cvf ../mars.tar --exclude=Root .rootrc *
124# @gzip -9 ../mars.tar
125
126# @endcode
Note: See TracBrowser for help on using the repository browser.