source: tags/Mars-V0.7/Makefile@ 10100

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