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