* Bring back rbuild build to be used until bug 6372 is fixed.
[reactos.git] / tools / rsym / rsym.mak
1 RSYM_BASE = $(TOOLS_BASE)$(SEP)rsym
2 RSYM_BASE_ = $(RSYM_BASE)$(SEP)
3 RSYM_INT = $(INTERMEDIATE_)$(RSYM_BASE)
4 RSYM_INT_ = $(RSYM_INT)$(SEP)
5 RSYM_OUT = $(OUTPUT_)$(RSYM_BASE)
6 RSYM_OUT_ = $(RSYM_OUT)$(SEP)
7
8 $(RSYM_INT): | $(TOOLS_INT)
9 $(ECHO_MKDIR)
10 ${mkdir} $@
11
12 ifneq ($(INTERMEDIATE),$(OUTPUT))
13 $(RSYM_OUT): | $(TOOLS_OUT)
14 $(ECHO_MKDIR)
15 ${mkdir} $@
16 endif
17
18 RSYM_TARGET = \
19 $(RSYM_OUT_)rsym$(EXEPOSTFIX)
20
21 ifeq ($(ARCH),amd64)
22 RSYM_SOURCES = \
23 $(RSYM_BASE_)rsym64.c \
24 $(RSYM_BASE_)rsym_common.c
25 else
26 RSYM_SOURCES = \
27 $(RSYM_BASE_)rsym.c \
28 $(RSYM_BASE_)rsym_common.c
29 endif
30
31 RSYM_OBJECTS = \
32 $(addprefix $(INTERMEDIATE_), $(RSYM_SOURCES:.c=.o))
33
34 ifeq ($(ARCH),amd64)
35 RSYM_HOST_CFLAGS = $(TOOLS_CFLAGS) -D_TARGET_PE64
36 else
37 RSYM_HOST_CFLAGS = $(TOOLS_CFLAGS)
38 endif
39
40 RSYM_HOST_LFLAGS = $(TOOLS_LFLAGS)
41
42 .PHONY: rsym
43 rsym: $(RSYM_TARGET)
44
45 $(RSYM_TARGET): $(RSYM_OBJECTS) | $(RSYM_OUT)
46 $(ECHO_LD)
47 ${host_gcc} $(RSYM_OBJECTS) $(RSYM_HOST_LFLAGS) -o $@
48
49 $(RSYM_INT_)rsym.o: $(RSYM_BASE_)rsym.c | $(RSYM_INT)
50 $(ECHO_CC)
51 ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@
52
53 $(RSYM_INT_)rsym64.o: $(RSYM_BASE_)rsym64.c | $(RSYM_INT)
54 $(ECHO_CC)
55 ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@
56
57 $(RSYM_INT_)rsym_common.o: $(RSYM_BASE_)rsym_common.c | $(RSYM_INT)
58 $(ECHO_CC)
59 ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@
60
61 .PHONY: rsym_clean
62 rsym_clean:
63 -@$(rm) $(RSYM_TARGET) $(RSYM_OBJECTS) 2>$(NUL)
64 clean: rsym_clean