]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/test/Makefile
Test for Coverity
[u/mrichter/AliRoot.git] / SHUTTLE / test / Makefile
1
2 include ../../build/Makefile.$(ALICE_TARGET)
3
4
5 CLASSES = TestITSPreprocessorSPD.cxx TestTPCPreprocessor.cxx TestHMPIDPreprocessor.cxx AliTPCDataDCS.cxx \
6           TestZDCPreprocessor.cxx TestTRDPreprocessor.cxx
7 DICT = DictTest.cxx
8
9 HEADERS := $(patsubst %.cxx,%.h,$(CLASSES))
10
11 SRCS = $(CLASSES) $(DICT)
12
13 OBJS := $(patsubst %.cxx,.obj/%.o,$(SRCS))
14 DEPS := $(patsubst .obj/%.o,.dep/%.d,$(OBJS))
15
16 INCDIR = -I$(shell root-config --incdir) -I../ -I../../include -I../../TPC
17 CXXFLAGS += $(INCDIR)
18 LIBDIR = $(shell root-config --libdir)
19
20
21 SHARED = -shared
22
23 .PHONY: all clean distclean dep
24
25 all: $(DEP) libTest.so
26
27 $(DICT): $(HEADERS) LinkDef.h
28         rootcint -f $@ -c $(INCDIR) $(HEADERS) LinkDef.h 
29
30
31 libTest.so: $(OBJS)
32         $(LD) $(SHARED) $(LDFLAGS) $^ -L$(LIBDIR) $(LIBS) -o $@
33
34
35 dep: $(DICT) $(DEPS)
36
37 clean:
38         rm -rf DictTest.h
39         rm -rf DictTest.cxx
40         rm -rf .dep
41         rm -rf .obj
42         rm -rf libTest.so
43
44 distclean: clean 
45
46 ifeq ($(filter %clean,$(MAKECMDGOALS)),)
47 DEPS_MAGIC := $(shell mkdir .dep > /dev/null 2>&1 || :)
48 endif
49 ifeq ($(strip $(filter %clean,$(MAKECMDGOALS)) $(filter dep,$(MAKECMDGOALS))),)
50 OBJS_MAGIC := $(shell mkdir .obj > /dev/null 2>&1 || :)
51 -include $(DEPS)
52 endif
53
54 .dep/%.d: %.cxx
55         set -e; $(CXX) -MM $(CXXFLAGS) $< | \
56         awk '/\.o/ {print ".dep/$(*F).d .obj/"$$0} ! /\.o/ {print $$0}' > .dep/$(*F).d
57
58 .obj/%.o: %.cxx
59         $(CXX) $(CXXFLAGS) -c $< -o .obj/$(*F).o 
60