[35cdc46] | 1 | # If you are using this Makefile standalone and fastjet-config is not
|
---|
| 2 | # in your path, edit this line to specify the full path
|
---|
| 3 | FASTJETCONFIG=fastjet-config
|
---|
| 4 | PREFIX=`$(FASTJETCONFIG) --prefix`
|
---|
| 5 | CXX=g++
|
---|
| 6 | CXXFLAGS= -O3 -Wall -Woverloaded-virtual -g -Wunused-parameter
|
---|
| 7 | install_script = $(SHELL) ../utils/install-sh
|
---|
| 8 | check_script = ../utils/check.sh
|
---|
| 9 |
|
---|
| 10 | # global contrib-wide Makefile include may override some of the above
|
---|
| 11 | # variables (leading "-" means don't give an error if you can't find
|
---|
| 12 | # the file)
|
---|
| 13 | -include ../.Makefile.inc
|
---|
| 14 |
|
---|
| 15 | #------------------------------------------------------------------------
|
---|
| 16 | # things that are specific to this contrib
|
---|
| 17 | NAME=Nsubjettiness
|
---|
| 18 | SRCS=Nsubjettiness.cc Njettiness.cc NjettinessPlugin.cc MeasureFunction.cc AxesFinder.cc WinnerTakeAllRecombiner.cc NjettinessDefinition.cc
|
---|
| 19 | EXAMPLES=example_basic_usage example_advanced_usage example_v1p0p3
|
---|
| 20 | INSTALLED_HEADERS=Nsubjettiness.hh Njettiness.hh NjettinessPlugin.hh MeasureFunction.hh AxesFinder.hh WinnerTakeAllRecombiner.hh NjettinessDefinition.hh
|
---|
| 21 | #------------------------------------------------------------------------
|
---|
| 22 |
|
---|
| 23 | CXXFLAGS+= $(shell $(FASTJETCONFIG) --cxxflags)
|
---|
| 24 | LDFLAGS += -lm $(shell $(FASTJETCONFIG) --libs)
|
---|
| 25 |
|
---|
| 26 | OBJS = $(SRCS:.cc=.o)
|
---|
| 27 | EXAMPLES_SRCS = $(EXAMPLES:=.cc)
|
---|
| 28 |
|
---|
| 29 | install_HEADER = $(install_script) -c -m 644
|
---|
| 30 | install_LIB = $(install_script) -c -m 644
|
---|
| 31 | install_DIR = $(install_script) -d
|
---|
| 32 | install_DATA = $(install_script) -c -m 644
|
---|
| 33 | install_PROGRAM = $(install_script) -c -s
|
---|
| 34 | install_SCRIPT = $(install_script) -c
|
---|
| 35 |
|
---|
| 36 | .PHONY: clean distclean examples check install
|
---|
| 37 |
|
---|
| 38 | # compilation of the code (default target)
|
---|
| 39 | all: lib$(NAME).a
|
---|
| 40 |
|
---|
| 41 | lib$(NAME).a: $(OBJS)
|
---|
| 42 | ar cru lib$(NAME).a $(OBJS)
|
---|
| 43 | ranlib lib$(NAME).a
|
---|
| 44 |
|
---|
| 45 | # building the examples
|
---|
| 46 | examples: $(EXAMPLES)
|
---|
| 47 |
|
---|
| 48 | # the following construct alloews to build each of the examples listed
|
---|
| 49 | # in $EXAMPLES automatically
|
---|
| 50 | $(EXAMPLES): % : %.o all
|
---|
| 51 | $(CXX) -o $@ $< -L. -l$(NAME) $(LDFLAGS)
|
---|
| 52 |
|
---|
| 53 | # check that everything went fine
|
---|
| 54 | check: examples
|
---|
| 55 | @for prog in $(EXAMPLES); do\
|
---|
| 56 | $(check_script) $${prog} ../data/single-event.dat || exit 1; \
|
---|
| 57 | done
|
---|
| 58 | @echo "All tests successful"
|
---|
| 59 |
|
---|
| 60 | # cleaning the directory
|
---|
| 61 | clean:
|
---|
| 62 | rm -f *~ *.o *.a
|
---|
| 63 |
|
---|
| 64 | distclean: clean
|
---|
| 65 | rm -f lib$(NAME).a $(EXAMPLES)
|
---|
| 66 |
|
---|
| 67 | # install things in PREFIX/...
|
---|
| 68 | install: all
|
---|
| 69 | $(install_DIR) $(PREFIX)/include/fastjet/contrib
|
---|
| 70 | for header in $(INSTALLED_HEADERS); do\
|
---|
| 71 | $(install_HEADER) $$header $(PREFIX)/include/fastjet/contrib/;\
|
---|
| 72 | done
|
---|
| 73 | $(install_DIR) $(PREFIX)/lib
|
---|
| 74 | $(install_LIB) lib$(NAME).a $(PREFIX)/lib
|
---|
| 75 |
|
---|
| 76 | depend:
|
---|
| 77 | makedepend -Y -- -- $(SRCS) $(EXAMPLES_SRCS)
|
---|
| 78 | # DO NOT DELETE
|
---|
| 79 |
|
---|
| 80 | Nsubjettiness.o: Nsubjettiness.hh Njettiness.hh MeasureFunction.hh
|
---|
| 81 | Nsubjettiness.o: AxesFinder.hh WinnerTakeAllRecombiner.hh
|
---|
| 82 | Nsubjettiness.o: NjettinessDefinition.hh
|
---|
| 83 | Njettiness.o: Njettiness.hh MeasureFunction.hh AxesFinder.hh
|
---|
| 84 | Njettiness.o: WinnerTakeAllRecombiner.hh NjettinessDefinition.hh
|
---|
| 85 | NjettinessPlugin.o: NjettinessPlugin.hh Njettiness.hh MeasureFunction.hh
|
---|
| 86 | NjettinessPlugin.o: AxesFinder.hh WinnerTakeAllRecombiner.hh
|
---|
| 87 | NjettinessPlugin.o: NjettinessDefinition.hh
|
---|
| 88 | MeasureFunction.o: MeasureFunction.hh
|
---|
| 89 | AxesFinder.o: AxesFinder.hh WinnerTakeAllRecombiner.hh MeasureFunction.hh
|
---|
| 90 | WinnerTakeAllRecombiner.o: WinnerTakeAllRecombiner.hh
|
---|
| 91 | NjettinessDefinition.o: NjettinessDefinition.hh MeasureFunction.hh
|
---|
| 92 | NjettinessDefinition.o: AxesFinder.hh WinnerTakeAllRecombiner.hh
|
---|
| 93 | example_basic_usage.o: Nsubjettiness.hh Njettiness.hh MeasureFunction.hh
|
---|
| 94 | example_basic_usage.o: AxesFinder.hh WinnerTakeAllRecombiner.hh
|
---|
| 95 | example_basic_usage.o: NjettinessDefinition.hh NjettinessPlugin.hh
|
---|
| 96 | example_advanced_usage.o: Nsubjettiness.hh Njettiness.hh MeasureFunction.hh
|
---|
| 97 | example_advanced_usage.o: AxesFinder.hh WinnerTakeAllRecombiner.hh
|
---|
| 98 | example_advanced_usage.o: NjettinessDefinition.hh NjettinessPlugin.hh
|
---|
| 99 | example_v1p0p3.o: Nsubjettiness.hh Njettiness.hh MeasureFunction.hh
|
---|
| 100 | example_v1p0p3.o: AxesFinder.hh WinnerTakeAllRecombiner.hh
|
---|
| 101 | example_v1p0p3.o: NjettinessDefinition.hh NjettinessPlugin.hh
|
---|