PAR: enabled some PARfiles (tested loading)
[u/mrichter/AliRoot.git] / cmake / PARfiles / Makefile.in
CommitLineData
b24da1d3 1# Makefile for @PARMODULE@ -- automatically generated
2
3# From ROOT
4include Makefile.arch
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
b24da1d3 13PAR_INCLUDES = -I. -I$(ALICE_ROOT)/include -I$(ALICE_PHYSICS)/include -I$(ROOTSYS)/include
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
6358896a 21# Exclude generated dictionaries from the list of sources
22SRCS := $(filter-out $(wildcard G__*.cxx),$(wildcard *.cxx))
b24da1d3 23
6358896a 24HDRS := $(SRCS:.cxx=.h)
25DHDR := $(PAR_MODULE)LinkDef.h
26
27SRCS += G__$(PAR_MODULE).cxx
28OBJS := $(SRCS:.cxx=.o)
29
30COLM := \033[35m
31COLC := \033[36m
32COLG := \033[32m
33COLZ := \033[m
34
35# Default rule (it's the first one, "all" is just a convention)
0c9d4db8 36all: lib$(PAR_MODULE).rootmap lib$(PAR_MODULE).so
6358896a 37 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)] $(COLG)PARfile built successfully$(COLZ)"
38
39# Abstract rule to compile classes to objects
b24da1d3 40%.o: %.cxx %.h
6358896a 41 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)] compiling $(COLC)$<$(COLZ)"
42 @$(CXX) $(PAR_CXXFLAGS) -c $< -o $@
b24da1d3 43
44# Generate library from objects
6358896a 45lib$(PAR_MODULE).so: $(OBJS)
46 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" building shared library
47 @$(LD) $(PAR_SOFLAGS) $^ -o $@ $(EXPLLINKLIBS)
b24da1d3 48
8409a855 49# Generate dictionary (rule broken up to accommodate parallel builds)
50G__$(PAR_MODULE).h: G__$(PAR_MODULE).cxx
51
52G__$(PAR_MODULE).cxx: $(HDRS) $(DHDR)
6358896a 53 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" generating dictionary
022ec091 54 @rootcint -f $@ -c -p $(PAR_INCLUDES) $^
b24da1d3 55
0c9d4db8 56# Generate rootmap (for automatic loading of libraries)
57lib$(PAR_MODULE).rootmap: lib$(PAR_MODULE).so
58 @echo -e "[$(COLM)$(PAR_MODULE)$(COLZ)]" generating rootmap
59 @rlibmap -o $@ -l lib$(PAR_MODULE) -d $(PAR_LIBDEPS) -c $(DHDR)
60
b24da1d3 61# Delete all
62clean:
0c9d4db8 63 rm -f $(OBJS) *.so G__$(PAR_MODULE).* *.rootmap