source: trunk/MagicSoft/Mars/Makefile@ 1405

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