PAR: consider FastJet includes where applicable
[u/mrichter/AliRoot.git] / cmake / PARfiles / Makefile.in
CommitLineData
b24da1d3 1# Makefile for @PARMODULE@ -- automatically generated
2
0f52e1c4 3# Include this file from the ROOT installed on the system where we are using the PARfile
4include $(shell root-config --etcdir)/Makefile.arch
b24da1d3 5
6# Name of this module
7PAR_MODULE := @PARMODULE@
8
0c9d4db8 9# This module depends on the following libraries
10PAR_LIBDEPS := @PARLIBDEPS@
11
6358896a 12# Include paths
42ad3e35 13PAR_EXTRAINCLUDES = @PAREXTRAINCLUDES@
14PAR_INCLUDES = -I. $(addprefix -I./,$(PAR_EXTRAINCLUDES)) -I$(ALICE_ROOT)/include -I$(ALICE_PHYSICS)/include -I$(shell root-config --incdir)
0798b0ca 15ifneq ($(FASTJET),)
16 PAR_INCLUDES += -I$(FASTJET)/include
17endif
b24da1d3 18
6358896a 19# Get C++ flags form ROOT
20PAR_CXXFLAGS = $(CXXFLAGS) $(PAR_INCLUDES)
b24da1d3 21
6358896a 22# Get linker flags from ROOT
23PAR_SOFLAGS = $(SOFLAGS) $(LDFLAGS)
b24da1d3 24
a2840dc4 25# Get some ROOT build flags from the current installation
26ROOT_DEFINES += $(shell root-config --features | grep -q xml && echo '-DWITHXML')
27ROOT_DEFINES += $(shell root-config --features | grep -q alien && echo '-DWITHALIEN')
28
6358896a 29# Exclude generated dictionaries from the list of sources
3c3403d8 30SRCS := @PARSOURCES_FLAT@
b24da1d3 31
6358896a 32HDRS := $(SRCS:.cxx=.h)
33DHDR := $(PAR_MODULE)LinkDef.h
34
35SRCS += G__$(PAR_MODULE).cxx
36OBJS := $(SRCS:.cxx=.o)
37
38COLM := \033[35m
39COLC := \033[36m
40COLG := \033[32m
41COLZ := \033[m
42
43# Default rule (it's the first one, "all" is just a convention)
0c9d4db8 44all: lib$(PAR_MODULE).rootmap lib$(PAR_MODULE).so
6358896a 45 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)] $(COLG)PARfile built successfully$(COLZ)"
46
47# Abstract rule to compile classes to objects
b24da1d3 48%.o: %.cxx %.h
6358896a 49 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)] compiling $(COLC)$<$(COLZ)"
50 @$(CXX) $(PAR_CXXFLAGS) -c $< -o $@
b24da1d3 51
52# Generate library from objects
6358896a 53lib$(PAR_MODULE).so: $(OBJS)
54 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" building shared library
55 @$(LD) $(PAR_SOFLAGS) $^ -o $@ $(EXPLLINKLIBS)
b24da1d3 56
8409a855 57# Generate dictionary (rule broken up to accommodate parallel builds)
58G__$(PAR_MODULE).h: G__$(PAR_MODULE).cxx
59
60G__$(PAR_MODULE).cxx: $(HDRS) $(DHDR)
6358896a 61 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" generating dictionary
a2840dc4 62 @rootcint -f $@ -c -p $(ROOT_DEFINES) $(PAR_INCLUDES) $^
b24da1d3 63
0c9d4db8 64# Generate rootmap (for automatic loading of libraries)
65lib$(PAR_MODULE).rootmap: lib$(PAR_MODULE).so
66 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" generating rootmap
67 @rlibmap -o $@ -l lib$(PAR_MODULE) -d $(PAR_LIBDEPS) -c $(DHDR)
68
b24da1d3 69# Delete all
70clean:
0c9d4db8 71 rm -f $(OBJS) *.so G__$(PAR_MODULE).* *.rootmap