source: trunk/MagicSoft/Mars/Makefile@ 1284

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