]> git.uio.no Git - u/mrichter/AliRoot.git/blame - SHUTTLE/test/Makefile
o) removed files that were moved to STEER
[u/mrichter/AliRoot.git] / SHUTTLE / test / Makefile
CommitLineData
73abe331 1
2include ../../build/Makefile.$(ALICE_TARGET)
3
4
b948db8d 5CLASSES = TestServer.cxx TestITSPreprocessor.cxx TestTPCPreprocessor.cxx
73abe331 6
7DICT = DictTest.cxx
8
9HEADERS := $(patsubst %.cxx,%.h,$(CLASSES))
10
11SRCS = $(CLASSES) $(DICT)
12
13OBJS := $(patsubst %.cxx,.obj/%.o,$(SRCS))
14DEPS := $(patsubst .obj/%.o,.dep/%.d,$(OBJS))
15
b948db8d 16INCDIR = -I$(shell root-config --incdir) -I../ -I../../include -I../../TPC
73abe331 17CXXFLAGS += $(INCDIR)
18LIBDIR = $(shell root-config --libdir)
19LIBS = $(shell root-config --libs)
20
21SHARED = -shared
22
23.PHONY: all clean distclean dep
24
25all: $(DEP) libTest.so
26
27$(DICT): $(HEADERS) LinkDef.h
28 rootcint -f $@ -c $(INCDIR) $(HEADERS) LinkDef.h
29
30
31libTest.so: $(OBJS)
32 $(LD) $(SHARED) $(LDFLAGS) $^ -L$(LIBDIR) $(LIBS) -o $@
33
34
35dep: $(DICT) $(DEPS)
36
37clean:
38 rm -rf DictTest.h
39 rm -rf DictTest.cxx
40 rm -rf .dep
41 rm -rf .obj
42 rm -rf libTest.so
43
44distclean: clean
45
46ifeq ($(filter %clean,$(MAKECMDGOALS)),)
47DEPS_MAGIC := $(shell mkdir .dep > /dev/null 2>&1 || :)
48endif
49ifeq ($(strip $(filter %clean,$(MAKECMDGOALS)) $(filter dep,$(MAKECMDGOALS))),)
50OBJS_MAGIC := $(shell mkdir .obj > /dev/null 2>&1 || :)
51-include $(DEPS)
52endif
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