# General Makefile for the OfflineUser package # # If the environment variable AUGEROFFLINEROOT is not set # AND the executable 'auger-offline-config' is not in your PATH # the definition of the following variable is required # # AUGEROFFLINEROOT := /cvmfs/auger.egi.eu/offline-v3r3-sl6/installed/offline/3.3.2-Dornroeschen # # Replace the wildcard expression with .cc file list if you do # not want to compile all .cc files in this directory # USER_SRCS := $(wildcard *.cc) # # All .xml.in files will be transformed into .xml with correct # config and schema locations # USER_XMLS := $(patsubst %.xml.in, %.xml, $(wildcard XML/*.xml.in *.xml.in)) USER_XSDS := $(patsubst %.xsd.in, %.xsd, $(wildcard XML/*.xsd.in)) # # Give your executable a name # EXE := userAugerOffline # ############################################################# ## You should not need to change anything below this line ### # Authors: T. Paul, S. Argiro, L. Nellen, D. Veberic # $Id$ # Send bug reports to http://www.auger.unam.mx/bugzilla/ .PHONY: all depend clean ifdef AUGEROFFLINEROOT AUGEROFFLINECONFIG := $(AUGEROFFLINEROOT)/bin/auger-offline-config else AUGEROFFLINECONFIG := auger-offline-config AUGEROFFLINEROOT := $(shell $(AUGEROFFLINECONFIG) --install) endif OBJS := $(USER_SRCS:.cc=.o) CPPFLAGS := $(shell $(AUGEROFFLINECONFIG) --cppflags) CXXFLAGS := $(shell $(AUGEROFFLINECONFIG) --cxxflags) LDFLAGS := $(shell $(AUGEROFFLINECONFIG) --ldflags) -lMinuit -lMinuit2 MAIN := $(shell $(AUGEROFFLINECONFIG) --main) CONFIGFILES := $(shell $(AUGEROFFLINECONFIG) --config) SCHEMALOCATION := $(shell $(AUGEROFFLINECONFIG) --schema-location) all: $(EXE) $(USER_XMLS) $(USER_XSDS) $(EXE): $(OBJS) $(CXX) $(CXXFLAGS) $^ $(MAIN) $(LDFLAGS) -o $@ %: %.in @echo -n "Generating $@ file..." @sed -e 's!@''CONFIGDIR@!$(CONFIGFILES)!g;s!@''CURRENT_PATH@!$(PWD)!g;s!@''SCHEMALOCATION@!$(SCHEMALOCATION)!g' $< >$@ @echo "done" ############################################################# # 'make run' will run the thing run: $(EXE) $(USER_XMLS) $(USER_XSDS) ./$(EXE) -b XML/bootstrap_AMIGA_Trunk.xml && touch $@ ############################################################# clean: - rm -f *.o *.so *.ps *.out *.log *.root core $(USER_XMLS) $(USER_XSDS) $(EXE) Make-depend ############################################################# # gcc can generate the dependency list depend: Make-depend Make-depend: $(USER_SRCS) $(CPP) $(CPPFLAGS) -MM $^ >$@ -include Make-depend