################################################################## # # makefile # # for the MARS software # ################################################################## # @maintitle # @code # # please change all system depend values in the # config.mk.${OSTYPE} file # # include Makefile.conf.$(OSTYPE) include Makefile.conf.general # PROGRAMS = readraw merpp mars SOLIB = mars.so CINT = M # # connect the include files defined in the config.mk file # # WARNING: the result (whether the linkage works or not) depends on the # order of the libraries. It seems, that the most base library # must be the last one # # # ----->>> mars libraries # SUBDIRS = mmain \ mmc \ mgui \ manalysis \ mbase \ meventdisp \ mdatacheck \ mmontecarlo \ mhist \ mfilter \ mraw LIBRARIES = $(SUBDIRS:=.a) #------------------------------------------------------------------------------ .SUFFIXES: .c .cc .h .o SRCFILES = SRCS = $(SRCFILES) HEADERS = $(SRCFILES:.cc=.h) OBJS = $(SRCFILES:.cc=.o) ############################################################ all: rmlib $(PROGRAMS) $(SOLIB) # Use $(CXX) -v ... for a more verbose output # # We could link mars.so instead of all libraries. This would need # some MBs less space on the HD. But this means, that the Shared # Library Path in your system must be set properly to be able to start # 'mars' # $(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o $(PROGRAMS:=.o) @echo " Linking $@ ..." $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@ $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o @echo " Linking $(SOLIB) ..." $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@ mv mars.so lib $(LIBRARIES): @echo " " @echo " Creating lib$@:" (cd $*; make; cd ..; mv $*/$@ lib/lib$@) dox: @echo " Creating html documentation:" root -b -q dohtml.C include Makefile.rules clean: rmlib rmcint rmobjs rmcore rmbin mrproper: clean rmbak @echo "Removing backup files in macros" @rm -f macros/*~ @echo "Removing htmldoc-tree" @rm -rf htmldoc @echo "Doing Mr.Proper in mbase" @cd mbase; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mraw" @cd mraw; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mhist" @cd mhist; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mfilter" @cd mfilter; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mgui" @cd mgui; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mdatacheck" @cd mdatacheck; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mmc" @cd mmc; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mevtdisp" @cd meventdisp; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in manalysis" @cd manalysis; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mmontecarlo" @cd mmontecarlo; (make mrproper > /dev/null); cd .. @echo "Doing Mr.Proper in mmain" @cd mmain; (make mrproper > /dev/null); cd .. @echo "Done." tar: mrproper @echo "Making tar-file" @tar cvf ../mars.tar --exclude=Root .rootrc * @gzip -9 ../mars.tar # @endcode