source: trunk/MagicSoft/Mars/Makefile@ 1971

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