# 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.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, S. Mueller # $Id$ # Send bug reports to http://www.auger.unam.mx/bugzilla/ .PHONY: all depend clean config # if somebody defined INPUTDATA for us, leave it alone ifndef INPUTDATA export INPUTDATA := ../../SampleShowers/quintuple_ad_SD_12018427.root endif # Default to data type "IoAuger" (EventFileReader) ifndef INPUTTYPE export INPUTTYPE := IoAuger endif ifndef INPUTUPTIME export INPUTUPTIME := endif export DATABASESERVERS := $(if $(wildcard databaseServers.*),,) 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) MAIN := $(shell $(AUGEROFFLINECONFIG) --main) export CONFIGFILES := $(shell $(AUGEROFFLINECONFIG) --config) export XMLSCHEMALOCATION := $(shell $(AUGEROFFLINECONFIG) --schema-location) all: $(EXE) $(USER_XMLS) config: $(USER_XMLS) $(EXE): $(OBJS) $(CXX) -o $@ $^ $(MAIN) $(CXXFLAGS) $(LDFLAGS) -lMinuit %: %.in @echo -n "Generating $@ file..." @perl -pe 's/\@(INPUTDATA|INPUTTYPE|INPUTUPTIME)\@/$$ENV{$$1}/g;s/@(CONFIGDIR)@/$$ENV{CONFIGFILES}/g;s/@(SCHEMALOCATION)@/$$ENV{XMLSCHEMALOCATION}/g;s//$$ENV{DATABASESERVERS}/g;' $< >$@ @echo "done" clean: - rm -f *.o *.so *.ps core $(USER_XMLS) Make-depend ############################################################# # gcc can generate the dependency list depend: Make-depend Make-depend: $(USER_SRCS) $(CPP) $(CPPFLAGS) -MM $^ >$@ -include Make-depend