source: tags/Mars-V0.6/Makefile@ 13198

Last change on this file since 13198 was 1057, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.5 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# We could link mars.so instead of all libraries. This would need
72# some MBs less space on the HD. But this means, that the Shared
73# Library Path in your system must be set properly to be able to start
74# 'mars'
75#
76$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o $(PROGRAMS:=.o)
77 @echo " Linking $@ ..."
78 $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
79
80$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
81 @echo " Linking $(SOLIB) ..."
82 $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
83 mv mars.so lib
84
85$(LIBRARIES):
86 @echo " Creating lib$@:"
87 (cd $*; make; cd ..; mv $*/$@ lib/lib$@)
88
89$(MRPROPERS):
90 @echo " Doing Mr.Proper in $(@:.mrproper=)"
91 (cd $(@:.mrproper=); (make mrproper > /dev/null); cd ..;)
92
93$(CLEANERS):
94 @echo "Cleaning $(@:.clean=):"
95 (cd $(@:.clean=); make clean; cd ..;)
96
97dox:
98 @echo " Creating html documentation:"
99 root -b -q dohtml.C
100
101include Makefile.rules
102
103clean: rmcint rmobjs rmcore rmlib
104
105mrproper: $(MRPROPERS) rmbin rmbak rmbakmac rmhtml clean
106 @echo " Done."
107 @echo " "
108
109tar: mrproper
110 @echo "Making tar-file"
111 @tar cvf ../mars.tar --exclude=Root .rootrc *
112 @gzip -9 ../mars.tar
113
114# @endcode
Note: See TracBrowser for help on using the repository browser.