# -*- Makefile -*- # This Makefile template gets processed by the 'configure' script using # @contrib_commandline@ # If you edit the processed version, any changes will be lost after the next configure # (for developers, make sure any edits fit with the rest of the build system) # installation setup SUBDIRS=@CONTRIB_BUILD_LIST@ # the following create targets that we will use for # make all, make examples and make check SUBDIRS.all=$(SUBDIRS:=.all) SUBDIRS.ex=$(SUBDIRS:=.ex) SUBDIRS.check=$(SUBDIRS:=.check) SUBDIRS.install=$(SUBDIRS:=.install) # these will be overriden if the user specifies CXX or CXXFLAGS with configure # they will also be overriden by definitions in subsiduary Makefiles CXX=g++ CXXFLAGS=-O2 -Wall -g # get any variables defined in the contrib-wide include -include .Makefile.inc # make invocations in subdirectories have an environment variable # set so that they can alter their behaviour if need be # (e.g. for make check) SUBMAKE= $(MAKE) FJCONTRIB_SUBMAKE=1 .PHONY: $(SUBDIRS) $(SUBDIRS.all) clean distclean check check_init install examples all: $(SUBDIRS.all) install: $(SUBDIRS.install) examples: $(SUBDIRS.ex) clean: $(SUBDIRS) distclean: $(SUBDIRS) fragile-shared-distclean check: $(SUBDIRS.check) @echo "" @echo "Summary of tests" @echo "----------------" @cat test_summary.tmp | sort @printf "\n%d out of %d tests passed\n\n" `grep "Success" test_summary.tmp | wc -l` `grep "^ " test_summary.tmp | wc -l` # if the number of tests passed is not equal to the number of tests run, exit with an error @test `grep "Success" test_summary.tmp | wc -l` -eq `grep "^ " test_summary.tmp | wc -l` || (rm -f test_summary.tmp && exit 1) @rm -f test_summary.tmp # distclean removes the Makefile, but leaves in config.log distclean: rm -f Makefile rm -f .Makefile.inc # dirty hack to provide a shared library to CMS; this is extremely fragile # and will be hopefully replaced with a more robust solution at some # point in the future; note, that you must still do make install # in order for all the headers to be installed fragile-shared: libfastjetcontribfragile.@DYNLIBEXT@ fragile_SHARED_SRC_LIST=@FRAGILE_SHARED_SRC_LIST@ fragile_SHARED_INCLUDES=@FRAGILE_SHARED_INCLUDES@ libfastjetcontribfragile.@DYNLIBEXT@: $(fragile_SHARED_SRC_LIST) $(CXX) @DYNLIBOPT@ -fPIC -DPIC $(CXXFLAGS) `$(FASTJETCONFIG) --cxxflags --libs` $(fragile_SHARED_INCLUDES) $(fragile_SHARED_SRC_LIST) -o libfastjetcontribfragile.@DYNLIBEXT@ fragile-shared-install: fragile-shared utils/install-sh -c -m 755 libfastjetcontribfragile.@DYNLIBEXT@ $(PREFIX)/lib @DYNLIBPOSTPROC@ $(PREFIX)/lib/libfastjetcontribfragile.@DYNLIBEXT@ fragile-shared-distclean: rm -f libfastjetcontribfragile.@DYNLIBEXT@ $(SUBDIRS): +$(SUBMAKE) -C $@ $(MAKECMDGOALS) # $(SUBDIRS.all): # +$(SUBMAKE) -C $(basename $@)