source: tags/Mars-V0.4/Makefile@ 19008

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