raddr2line utility
[reactos.git] / reactos / tools / Makefile
1 PATH_TO_TOP = ..
2
3 include $(PATH_TO_TOP)/rules.mak
4
5 CFLAGS += -Wall -Werror
6 ifeq ($(HOST),mingw32-linux)
7 CFLAGS += -DUNIX_PATHS
8 rm := @rm
9 endif
10 ifeq ($(HOST),mingw32-windows)
11 CFLAGS += -DDOS_PATHS
12 rm := -@del
13 endif
14
15 TOOLS = \
16 regtests$(EXE_POSTFIX) \
17 rcopy$(EXE_POSTFIX) \
18 rdel$(EXE_POSTFIX) \
19 rline$(EXE_POSTFIX) \
20 rmkdir$(EXE_POSTFIX) \
21 rrmdir$(EXE_POSTFIX) \
22 rsym$(EXE_POSTFIX) \
23 raddr2line$(EXE_POSTFIX) \
24 rtouch$(EXE_POSTFIX) \
25 mkflpimg$(EXE_POSTFIX) \
26 ppc-le2be$(EXE_POSTFIX) \
27 hack-coff$(EXE_POSTFIX) \
28 depends$(EXE_POSTFIX)
29
30 LIBS = lib_unicode lib_wpp
31
32 CLEAN_FILES = $(TOOLS) tools-check.tmp tools-check.h
33
34 all: $(TOOLS) tools_check $(LIBS) zlib_target wmc_target cabman_target cdmake_target mkhive_target rgenstat_target \
35 wine2ros_target pipetools_target winebuild_target bin2res_target wrc_target widl_target \
36 buildno_target
37
38 tools_check:
39 $(MAKE) -f tools-check.mak
40
41 regtests$(EXE_POSTFIX): regtests.c
42 @$(HOST_CC) $(CFLAGS) -o $@ $<
43
44 rcopy$(EXE_POSTFIX): rcopy.c
45 @$(HOST_CC) $(CFLAGS) $< -o $@
46
47 rdel$(EXE_POSTFIX): rdel.c
48 @$(HOST_CC) $(CFLAGS) $< -o $@
49
50 rline$(EXE_POSTFIX): rline.c
51 @$(HOST_CC) $(CFLAGS) $< -o $@
52
53 rmkdir$(EXE_POSTFIX): rmkdir.c
54 @$(HOST_CC) $(CFLAGS) $< -o $@
55
56 rrmdir$(EXE_POSTFIX): rrmdir.c
57 @$(HOST_CC) $(CFLAGS) $< -o $@
58
59 rsym_common.o: rsym_common.c rsym.h
60 @$(HOST_CC) $(CFLAGS) -c $< -o $@
61
62 rsym.o: rsym.c rsym.h
63 @$(HOST_CC) $(CFLAGS) -c $< -o $@
64
65 rsym$(EXE_POSTFIX): rsym.o rsym_common.o
66 @$(HOST_CC) $(CFLAGS) $^ -o $@
67
68 raddr2line.o: raddr2line.c rsym.h
69 @$(HOST_CC) $(CFLAGS) -c $< -o $@
70
71 raddr2line$(EXE_POSTFIX): raddr2line.o rsym_common.o
72 @$(HOST_CC) $(CFLAGS) $^ -o $@
73
74 rtouch$(EXE_POSTFIX): rtouch.c
75 @$(HOST_CC) $(CFLAGS) $< -o $@
76
77 mkflpimg$(EXE_POSTFIX): mkflpimg.c
78 @$(HOST_CC) $(CFLAGS) $< -o $@
79
80 hack-coff$(EXE_POSTFIX): hack-coff.c
81 @$(HOST_CC) $(CFLAGS) $< -o $@
82
83 ppc-le2be$(EXE_POSTFIX): ppc-le2be.c
84 @$(HOST_CC) $(CFLAGS) $< -o $@
85
86 depends$(EXE_POSTFIX): depends.c
87 @$(HOST_CC) $(CFLAGS) $< -o $@
88
89 .PHONY: zlib_target wmc_target cdmake_target mkhive_target rgenstat_target pipetools_target wrc_target \
90 widl_target buildno_target lib_unicode lib_wpp
91
92 zlib_target:
93 $(MAKE) --silent -C ../lib/zlib -f Makefile.host
94
95 wmc_target:
96 $(MAKE) --silent -C wmc wmc$(EXE_POSTFIX)
97
98 cabman_target:
99 $(MAKE) --silent -C cabman cabman$(EXE_POSTFIX)
100
101 cdmake_target:
102 $(MAKE) --silent -C cdmake cdmake$(EXE_POSTFIX)
103
104 mkhive_target:
105 $(MAKE) --silent -C mkhive mkhive$(EXE_POSTFIX)
106
107 rgenstat_target:
108 $(MAKE) --silent -C rgenstat rgenstat$(EXE_POSTFIX)
109
110 wine2ros_target:
111 $(MAKE) --silent -C wine2ros wine2ros$(EXE_POSTFIX)
112
113 pipetools_target:
114 ifeq ($(HOST),mingw32-windows)
115 $(MAKE) --silent -C pipetools
116 endif
117
118 winebuild_target:
119 $(MAKE) --silent -C winebuild winebuild$(EXE_POSTFIX)
120
121 bin2res_target:
122 $(MAKE) --silent -C bin2res bin2res$(EXE_POSTFIX)
123
124 wrc_target: $(LIBS)
125 $(MAKE) --silent -C wrc wrc$(EXE_POSTFIX)
126
127 widl_target: lib_wpp
128 $(MAKE) --silent -C widl widl$(EXE_POSTFIX)
129
130 buildno_target:
131 $(MAKE) --silent -C buildno buildno$(EXE_POSTFIX)
132
133 lib_unicode:
134 $(MAKE) -C unicode
135
136 lib_wpp:
137 $(MAKE) -C wpp
138
139
140 clean:
141 $(MAKE) --silent -C buildno clean
142 $(MAKE) --silent -C widl clean
143 $(MAKE) --silent -C wrc clean
144 $(MAKE) --silent -C cabman clean
145 $(MAKE) --silent -C cdmake clean
146 $(MAKE) --silent -C mkhive clean
147 $(MAKE) --silent -C wmc clean
148 $(MAKE) --silent -C rgenstat clean
149 $(MAKE) --silent -C wine2ros clean
150 $(MAKE) --silent -C winebuild clean
151 $(MAKE) --silent -C bin2res clean
152 $(MAKE) --silent -C ../lib/zlib -f Makefile.host clean
153 $(MAKE) -C wpp clean
154 $(MAKE) -C unicode clean
155 ifeq ($(HOST),mingw32-linux)
156 @rm mkconfig
157 @rm $(TOOLS)
158 endif
159 ifeq ($(HOST),mingw32-windows)
160 $(MAKE) --silent -C pipetools clean
161 $(rm) *$(EXE_POSTFIX)
162 endif
163
164 .PHONY: all clean