]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/DCSClient/macros/Makefile
AliDCSClient "multiSplit" option added in the DCS configuration
[u/mrichter/AliRoot.git] / SHUTTLE / DCSClient / macros / Makefile
1
2 include ../../../build/Makefile.$(ALICE_TARGET)
3
4
5 CLASSES = TestServer.cxx 
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
15 INCDIR = -I$(shell root-config --incdir) -I../ -I../../../include 
16 CXXFLAGS += $(INCDIR)
17 LIBDIR = $(shell root-config --libdir)
18
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