source: trunk/MagicSoft/Mars/Makefile@ 1408

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