Fixed clean rule
[reactos.git] / reactos / tools / Makefile
1 PATH_TO_TOP = ..
2
3 TOOLS = \
4 buildno$(EXE_POSTFIX) \
5 depends$(EXE_POSTFIX) \
6 rcopy$(EXE_POSTFIX) \
7 rdel$(EXE_POSTFIX) \
8 rmkdir$(EXE_POSTFIX) \
9 rrmdir$(EXE_POSTFIX)
10
11 CLEAN_FILES = $(TOOLS)
12
13 all: $(TOOLS) wmc_directory_target
14
15 buildno$(EXE_POSTFIX): buildno.c ../include/reactos/version.h
16 $(HOST_CC) $(CFLAGS) -o buildno$(EXE_POSTFIX) buildno.c
17 $(EXE_PREFIX)buildno$(EXE_POSTFIX)
18
19 depends$(EXE_POSTFIX): depends.c
20 $(HOST_CC) $(CFLAGS) -o depends$(EXE_POSTFIX) depends.c
21
22 ifeq ($(HOST),mingw32-linux)
23 rcopy$(EXE_POSTFIX): rcopy.c
24 $(HOST_CC) $(CFLAGS) -DUNIX_PATHS rcopy.c -o rcopy$(EXE_POSTFIX)
25 endif
26 ifeq ($(HOST),mingw32-windows)
27 rcopy$(EXE_POSTFIX): rcopy.c
28 $(HOST_CC) $(CFLAGS) -DDOS_PATHS rcopy.c -o rcopy$(EXE_POSTFIX)
29 endif
30
31 rdel$(EXE_POSTFIX): rdel.c
32 $(HOST_CC) $(CFLAGS) rdel.c -o rdel$(EXE_POSTFIX)
33 # $(HOST_CC) $(CFLAGS) -liberty rdel.c -o rdel$(EXE_POSTFIX)
34
35 ifeq ($(HOST),mingw32-linux)
36 rmkdir$(EXE_POSTFIX): rmkdir.c
37 $(HOST_CC) $(CFLAGS) -DUNIX_PATHS rmkdir.c -o rmkdir$(EXE_POSTFIX)
38 endif
39 ifeq ($(HOST),mingw32-windows)
40 rmkdir$(EXE_POSTFIX): rmkdir.c
41 $(HOST_CC) $(CFLAGS) -DDOS_PATHS rmkdir.c -o rmkdir$(EXE_POSTFIX)
42 endif
43
44 ifeq ($(HOST),mingw32-linux)
45 rrmdir$(EXE_POSTFIX): rrmdir.c
46 $(HOST_CC) $(CFLAGS) -DUNIX_PATHS rrmdir.c -o rrmdir$(EXE_POSTFIX)
47 endif
48 ifeq ($(HOST),mingw32-windows)
49 rrmdir$(EXE_POSTFIX): rrmdir.c
50 $(HOST_CC) $(CFLAGS) -DDOS_PATHS rrmdir.c -o rrmdir$(EXE_POSTFIX)
51 endif
52
53 wmc_directory_target:
54 make -C wmc wmc$(EXE_POSTFIX)
55
56 ifeq ($(HOST),mingw32-linux)
57 clean:
58 rm $(TOOLS)
59 rm mkconfig$(EXE_POSTFIX)
60 make -C wmc clean
61 endif
62 ifeq ($(HOST),mingw32-windows)
63 clean:
64 $(PATH_TO_TOP)/rdel $(TOOLS)
65 $(PATH_TO_TOP)/rdel mkconfig$(EXE_POSTFIX)
66 make -C wmc clean
67 endif
68
69 .PHONY: all clean
70
71 include $(PATH_TO_TOP)/rules.mak