eliminate rmkdir and generate directory dependencies the right way.
[reactos.git] / reactos / tools / tools.mak
1 TOOLS_BASE = tools
2 TOOLS_BASE_ = $(TOOLS_BASE)$(SEP)
3 TOOLS_INT = $(INTERMEDIATE_)$(TOOLS_BASE)
4 TOOLS_INT_ = $(TOOLS_INT)$(SEP)
5 TOOLS_OUT = $(OUTPUT_)$(TOOLS_BASE)
6 TOOLS_OUT_ = $(TOOLS_OUT)$(SEP)
7
8 $(TOOLS_INT): $(INTERMEDIATE)
9 $(ECHO_MKDIR)
10 ${mkdir} $@
11
12 ifneq ($(INTERMEDIATE),$(OUTPUT))
13 $(TOOLS_OUT): $(OUTPUT)
14 $(ECHO_MKDIR)
15 ${mkdir} $@
16 endif
17
18 RSYM_BASE = $(TOOLS_BASE)
19 RSYM_BASE_ = $(RSYM_BASE)$(SEP)
20
21 RSYM_INT = $(INTERMEDIATE_)$(RSYM_BASE)
22 RSYM_INT_ = $(RSYM_INT)$(SEP)
23 RSYM_OUT = $(OUTPUT_)$(RSYM_BASE)
24 RSYM_OUT_ = $(RSYM_OUT)$(SEP)
25
26 RSYM_TARGET = \
27 $(EXEPREFIX)$(RSYM_OUT_)rsym$(EXEPOSTFIX)
28
29 RSYM_SOURCES = \
30 $(RSYM_BASE_)rsym.c
31
32 RSYM_OBJECTS = \
33 $(addprefix $(INTERMEDIATE_), $(RSYM_SOURCES:.c=.o))
34
35 RSYM_HOST_CFLAGS = -g -Werror -Wall
36
37 RSYM_HOST_LFLAGS = -g
38
39 .PHONY: rsym
40 rsym: $(RSYM_TARGET)
41
42 $(RSYM_TARGET): $(RSYM_OBJECTS) $(RSYM_OUT)
43 $(ECHO_LD)
44 ${host_gcc} $(RSYM_OBJECTS) $(RSYM_HOST_LFLAGS) -o $@
45
46 $(RSYM_INT_)rsym.o: $(RSYM_BASE_)rsym.c $(RSYM_INT)
47 $(ECHO_CC)
48 ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@
49
50 .PHONY: rsym_clean
51 rsym_clean:
52 -@$(rm) $(RSYM_TARGET) $(RSYM_OBJECTS) 2>$(NUL)
53 clean: rsym_clean
54
55
56 include tools/bin2res/bin2res.mak
57 include tools/buildno/buildno.mak
58 include tools/cabman/cabman.mak
59 include tools/cdmake/cdmake.mak
60 include tools/nci/nci.mak
61 include tools/rbuild/rbuild.mak
62 include tools/unicode/unicode.mak
63 include tools/winebuild/winebuild.mak
64 include tools/wmc/wmc.mak
65 include tools/wpp/wpp.mak
66 include tools/wrc/wrc.mak