]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/TRD/info/Makefile
revert unwanted changes
[u/mrichter/AliRoot.git] / PWGPP / TRD / info / Makefile
CommitLineData
1ee39b3a 1SrcSuf = cxx
2HdrSuf = h
3ExeSuf =
4ObjSuf = o
5DllSuf = so
6OutPutOpt = -o
7
8CXX = g++
9LD = g++
10CXXFLAGS = -O -fPIC
11LDFLAGS = -O -fPIC
12SOFLAGS = -shared
13
14ROOTCXX = $(shell root-config --cflags)
15ROOTLIBS = $(shell root-config --libs)
16
17ALICXX = -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/TRD
18
19CXXFLAGS += $(ROOTCXX) $(ALICXX)
20
21# define module specific variables
22FILE_LIST = $(shell ls -1 ./*.$(SrcSuf))
23FILES = $(basename $(FILE_LIST))
24DICTIONARIES = trdTrackInfoDict
25OBJECTS = $(addsuffix .$(ObjSuf),$(FILES))
26OBJECTS += ./$(DICTIONARIES).$(ObjSuf)
27
28#define headers
29HDRS = $(addsuffix .$(HdrSuf),$(FILES))
30HEADERS = $(notdir $(HDRS))
31
32# define libs on which the main lib depends ! (this are defined in config/Makefile.flags)
33LIBSDEPEND = $(ROOTLIBS) $(ALILIBS)
34# define libs build by module
35LIBS = libTRDtrackInfo.so
36
37
38# rule for building executables
39$(EXECS): $(OBJECTS)
40 @echo -e "\E[31mBuild executable: \E[1;31m$@\E[0m"
41 @$(LD) $(LIBSDEPEND) $^ -o $@
42
43# rule for building libraries
44%.$(DllSuf): $(OBJECTS)
45 @echo -e "\E[31mBuild library: \E[1;31m$@\E[0m"
46 @$(LD) $(SOFLAGS) $(LIBSDEPEND) $^ -o $@
47
48# rule for building objects
49%.$(ObjSuf): %.$(SrcSuf)
50 @echo -e "\E[31mCompile : \E[1;31m$^\E[0m"
51 @$(CXX) $(CXXFLAGS) -c $< -o $@
52
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) $^
57
58all: $(OBJECTS) $(LIBS) $(EXECS)
59
60clean:
61 @rm -fv $(DICTIONARIES)
62 @rm -fv $(OBJECTS)
63 @rm -fv $(LIBS)
64 @rm -fv $(EXECS)
65 @if [ "$(LIBS)" != "" ]; then rm -fv lib/$(LIBS); fi
66 @if [ "$(EXECS)" != "" ]; then rm -fv bin/$(EXECS); fi
67
68