source: trunk/MagicSoft/Mars/Makefile@ 1769

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