CMake: prepend_prefix() to every elm in a list
[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
0f52e1c4 13PAR_INCLUDES = -I. -I$(ALICE_ROOT)/include -I$(ALICE_PHYSICS)/include -I$(shell root-config --incdir)
b24da1d3 14
6358896a 15# Get C++ flags form ROOT
16PAR_CXXFLAGS = $(CXXFLAGS) $(PAR_INCLUDES)
b24da1d3 17
6358896a 18# Get linker flags from ROOT
19PAR_SOFLAGS = $(SOFLAGS) $(LDFLAGS)
b24da1d3 20
a2840dc4 21# Get some ROOT build flags from the current installation
22ROOT_DEFINES += $(shell root-config --features | grep -q xml && echo '-DWITHXML')
23ROOT_DEFINES += $(shell root-config --features | grep -q alien && echo '-DWITHALIEN')
24
6358896a 25# Exclude generated dictionaries from the list of sources
26SRCS := $(filter-out $(wildcard G__*.cxx),$(wildcard *.cxx))
b24da1d3 27
6358896a 28HDRS := $(SRCS:.cxx=.h)
29DHDR := $(PAR_MODULE)LinkDef.h
30
31SRCS += G__$(PAR_MODULE).cxx
32OBJS := $(SRCS:.cxx=.o)
33
34COLM := \033[35m
35COLC := \033[36m
36COLG := \033[32m
37COLZ := \033[m
38
39# Default rule (it's the first one, "all" is just a convention)
0c9d4db8 40all: lib$(PAR_MODULE).rootmap lib$(PAR_MODULE).so
6358896a 41 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)] $(COLG)PARfile built successfully$(COLZ)"
42
43# Abstract rule to compile classes to objects
b24da1d3 44%.o: %.cxx %.h
6358896a 45 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)] compiling $(COLC)$<$(COLZ)"
46 @$(CXX) $(PAR_CXXFLAGS) -c $< -o $@
b24da1d3 47
48# Generate library from objects
6358896a 49lib$(PAR_MODULE).so: $(OBJS)
50 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" building shared library
51 @$(LD) $(PAR_SOFLAGS) $^ -o $@ $(EXPLLINKLIBS)
b24da1d3 52
8409a855 53# Generate dictionary (rule broken up to accommodate parallel builds)
54G__$(PAR_MODULE).h: G__$(PAR_MODULE).cxx
55
56G__$(PAR_MODULE).cxx: $(HDRS) $(DHDR)
6358896a 57 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" generating dictionary
a2840dc4 58 @rootcint -f $@ -c -p $(ROOT_DEFINES) $(PAR_INCLUDES) $^
b24da1d3 59
0c9d4db8 60# Generate rootmap (for automatic loading of libraries)
61lib$(PAR_MODULE).rootmap: lib$(PAR_MODULE).so
62 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" generating rootmap
63 @rlibmap -o $@ -l lib$(PAR_MODULE) -d $(PAR_LIBDEPS) -c $(DHDR)
64
b24da1d3 65# Delete all
66clean:
0c9d4db8 67 rm -f $(OBJS) *.so G__$(PAR_MODULE).* *.rootmap