source: trunk/MagicSoft/Mars/Makefile@ 1988

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