14 ROOTCXX = $(shell root-config --cflags)
15 ROOTLIBS = $(shell root-config --libs)
17 ALICXX = -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/TRD
19 CXXFLAGS += $(ROOTCXX) $(ALICXX)
21 # define module specific variables
22 FILE_LIST = $(shell ls -1 ./*.$(SrcSuf))
23 FILES = $(basename $(FILE_LIST))
24 DICTIONARIES = trdTrackInfoDict
25 OBJECTS = $(addsuffix .$(ObjSuf),$(FILES))
26 OBJECTS += ./$(DICTIONARIES).$(ObjSuf)
29 HDRS = $(addsuffix .$(HdrSuf),$(FILES))
30 HEADERS = $(notdir $(HDRS))
32 # define libs on which the main lib depends ! (this are defined in config/Makefile.flags)
33 LIBSDEPEND = $(ROOTLIBS) $(ALILIBS)
34 # define libs build by module
35 LIBS = libTRDtrackInfo.so
38 # rule for building executables
40 @echo -e "\E[31mBuild executable: \E[1;31m$@\E[0m"
41 @$(LD) $(LIBSDEPEND) $^ -o $@
43 # rule for building libraries
44 %.$(DllSuf): $(OBJECTS)
45 @echo -e "\E[31mBuild library: \E[1;31m$@\E[0m"
46 @$(LD) $(SOFLAGS) $(LIBSDEPEND) $^ -o $@
48 # rule for building objects
49 %.$(ObjSuf): %.$(SrcSuf)
50 @echo -e "\E[31mCompile : \E[1;31m$^\E[0m"
51 @$(CXX) $(CXXFLAGS) -c $< -o $@
53 #rule for building dictionary
54 %Dict.$(SrcSuf): %LinkDef.h
55 @echo -e "\E[31mGenerate dictionary : \E[1;31m$@\E[0m"
56 @rootcint -f $@ -c $(CXXFLAGS) $(HEADERS) $^
58 all: $(OBJECTS) $(LIBS) $(EXECS)
61 @rm -fv $(DICTIONARIES)
65 @if [ "$(LIBS)" != "" ]; then rm -fv lib/$(LIBS); fi
66 @if [ "$(EXECS)" != "" ]; then rm -fv bin/$(EXECS); fi