PAR: fixed wrong echo on OS X
[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@
91b29849 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')
ed0d5f1d 28ifneq ($(FASTJET),)
29 ROOT_DEFINES += -DHAVE_FASTJET
30endif
a2840dc4 31
3c3403d8 32SRCS := @PARSOURCES_FLAT@
a05f4fbd 33HDRS := @PARHEADERS_FLAT@
b24da1d3 34
6358896a 35DHDR := $(PAR_MODULE)LinkDef.h
36
37SRCS += G__$(PAR_MODULE).cxx
38OBJS := $(SRCS:.cxx=.o)
39
40COLM := \033[35m
41COLC := \033[36m
42COLG := \033[32m
43COLZ := \033[m
44
17e95a2b 45# Multiplatform echo. Interprets escapes. Use it with $(call ECHO,"<message>")
46ECHO = printf $(1)"\n"
47
6358896a 48# Default rule (it's the first one, "all" is just a convention)
0c9d4db8 49all: lib$(PAR_MODULE).rootmap lib$(PAR_MODULE).so
17e95a2b 50 @$(call ECHO,"[$(COLM)$(PAR_MODULE)$(COLZ)] $(COLG)PARfile built successfully$(COLZ)")
6358896a 51
52# Abstract rule to compile classes to objects
b24da1d3 53%.o: %.cxx %.h
17e95a2b 54 @$(call ECHO,"[$(COLM)$(PAR_MODULE)$(COLZ)] compiling $(COLC)$<$(COLZ)")
6358896a 55 @$(CXX) $(PAR_CXXFLAGS) -c $< -o $@
b24da1d3 56
57# Generate library from objects
6358896a 58lib$(PAR_MODULE).so: $(OBJS)
17e95a2b 59 @$(call ECHO,"[$(COLM)$(PAR_MODULE)$(COLZ)] building shared library")
6358896a 60 @$(LD) $(PAR_SOFLAGS) $^ -o $@ $(EXPLLINKLIBS)
b24da1d3 61
8409a855 62# Generate dictionary (rule broken up to accommodate parallel builds)
63G__$(PAR_MODULE).h: G__$(PAR_MODULE).cxx
64
65G__$(PAR_MODULE).cxx: $(HDRS) $(DHDR)
17e95a2b 66 @$(call ECHO,"[$(COLM)$(PAR_MODULE)$(COLZ)] generating dictionary")
a2840dc4 67 @rootcint -f $@ -c -p $(ROOT_DEFINES) $(PAR_INCLUDES) $^
b24da1d3 68
0c9d4db8 69# Generate rootmap (for automatic loading of libraries)
70lib$(PAR_MODULE).rootmap: lib$(PAR_MODULE).so
17e95a2b 71 @$(call ECHO,"[$(COLM)$(PAR_MODULE)$(COLZ)] generating rootmap")
0c9d4db8 72 @rlibmap -o $@ -l lib$(PAR_MODULE) -d $(PAR_LIBDEPS) -c $(DHDR)
73
b24da1d3 74# Delete all
75clean:
0c9d4db8 76 rm -f $(OBJS) *.so G__$(PAR_MODULE).* *.rootmap