source: trunk/MagicSoft/Mars/Makefile@ 544

Last change on this file since 544 was 543, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 2.0 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 mdatacheck mbase mraw
38
39#
40# Library rules
41#
42MARS_LIB = -Llib $(SUBDIRS:%=-l%)
43MARS_LIBB = $(SUBDIRS:%=lib%.a)
44INCLUDES = -I. $(SUBDIRS:%=-I%)
45
46
47#------------------------------------------------------------------------------
48
49.SUFFIXES: .c .cc .h .o
50
51SRCFILES =
52
53SRCS = $(SRCFILES)
54HEADERS = $(SRCFILES:.cc=.h)
55OBJS = $(SRCFILES:.cc=.o)
56
57############################################################
58
59all: rmlib $(PROGRAMS) $(SOLIB)
60
61# Use $(CXX) -v ... for a more verbose output
62$(PROGRAMS): $(MARS_LIBB) $(PROGRAMS:=.o) $(OBJS) MCint.o
63 @echo " Linking $@ ..."
64 $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
65
66$(SOLIB): $(OBJS) $(MARS_LIBB) MCint.o
67 @echo " Linking $(SOLIB) ..."
68 $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:%=%/*.o) $(ROOTGLIBS) -o $@
69 mv mars.so lib
70
71$(MARS_LIBB):
72 @echo " Creating $@:"
73 (cd $(@:lib%.a=%); make; cd ..; mv $(@:lib%.a=%)/$@ lib)
74
75dox:
76 @echo " Creating html documentation:"
77 root -b -q dohtml.C
78
79
80include Makefile.rules
81
82clean: rmlib rmcint rmobjs rmcore rmbin
83
84mrproper: clean rmbak
85 @rm -f macros/*~
86 @rm -rf htmldoc
87 @echo "cd mbase"
88 @cd mbase; make mrproper; cd ..
89 @echo "cd .."
90 @echo "cd mraw"
91 @cd mraw; make mrproper; cd ..
92 @echo "cd .."
93 @echo "cd mgui"
94 @cd mgui; make mrproper; cd ..
95 @echo "cd .."
96 @echo "cd mdatacheck"
97 @cd mdatacheck; make mrproper; cd ..
98 @echo "cd .."
99
100
101# @endcode
Note: See TracBrowser for help on using the repository browser.