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