source: tags/Mars-V0.5/Makefile@ 14751

Last change on this file since 14751 was 1027, checked in by tbretz, 23 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 mmc \
39 mgui \
40 manalysis \
41 mbase \
42 meventdisp \
43 mdatacheck \
44 mmontecarlo \
45 mhist \
46 mfilter \
47 mraw
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 @echo "Removing backup files in macros"
96 @rm -f macros/*~
97 @echo "Removing htmldoc-tree"
98 @rm -rf htmldoc
99 @echo "Doing Mr.Proper in mbase"
100 @cd mbase; (make mrproper > /dev/null); cd ..
101 @echo "Doing Mr.Proper in mraw"
102 @cd mraw; (make mrproper > /dev/null); cd ..
103 @echo "Doing Mr.Proper in mhist"
104 @cd mhist; (make mrproper > /dev/null); cd ..
105 @echo "Doing Mr.Proper in mfilter"
106 @cd mfilter; (make mrproper > /dev/null); cd ..
107 @echo "Doing Mr.Proper in mgui"
108 @cd mgui; (make mrproper > /dev/null); cd ..
109 @echo "Doing Mr.Proper in mdatacheck"
110 @cd mdatacheck; (make mrproper > /dev/null); cd ..
111 @echo "Doing Mr.Proper in mmc"
112 @cd mmc; (make mrproper > /dev/null); cd ..
113 @echo "Doing Mr.Proper in mevtdisp"
114 @cd meventdisp; (make mrproper > /dev/null); cd ..
115 @echo "Doing Mr.Proper in manalysis"
116 @cd manalysis; (make mrproper > /dev/null); cd ..
117 @echo "Doing Mr.Proper in mmontecarlo"
118 @cd mmontecarlo; (make mrproper > /dev/null); cd ..
119 @echo "Doing Mr.Proper in mmain"
120 @cd mmain; (make mrproper > /dev/null); cd ..
121 @echo "Done."
122
123tar: mrproper
124 @echo "Making tar-file"
125 @tar cvf ../mars.tar --exclude=Root .rootrc *
126 @gzip -9 ../mars.tar
127
128# @endcode
Note: See TracBrowser for help on using the repository browser.