2bc87a2eb4a0db5546e375ae28e966f41f337235
[reactos.git] / reactos / tools / wmc / wmc.mak
1 WMC_BASE = tools$(SEP)wmc
2
3 WMC_BASE_DIR = $(INTERMEDIATE)$(WMC_BASE)
4
5 $(WMC_BASE_DIR): $(INTERMEDIATE_NO_SLASH) $(RMKDIR_TARGET)
6 ${mkdir} $(INTERMEDIATE)$(WMC_BASE)
7
8 WMC_TARGET = \
9 $(INTERMEDIATE)$(WMC_BASE)$(SEP)wmc$(EXEPOSTFIX)
10
11 WMC_SOURCES = \
12 $(WMC_BASE)$(SEP)getopt.c \
13 $(WMC_BASE)$(SEP)lang.c \
14 $(WMC_BASE)$(SEP)mcl.c \
15 $(WMC_BASE)$(SEP)utils.c \
16 $(WMC_BASE)$(SEP)wmc.c \
17 $(WMC_BASE)$(SEP)write.c \
18 $(WMC_BASE)$(SEP)y_tab.c \
19 $(WMC_BASE)$(SEP)misc.c
20
21 WMC_OBJECTS = \
22 $(addprefix $(INTERMEDIATE), $(WMC_SOURCES:.c=.o))
23
24 WMC_HOST_CXXFLAGS = -I$(WMC_BASE) -g -Werror -Wall
25
26 WMC_HOST_LFLAGS = -g
27
28 $(WMC_TARGET): $(WMC_BASE_DIR) $(WMC_OBJECTS)
29 $(ECHO_LD)
30 ${host_gcc} $(WMC_OBJECTS) $(WMC_HOST_LFLAGS) -o $(WMC_TARGET)
31
32 $(INTERMEDIATE)$(WMC_BASE)$(SEP)getopt.o: $(WMC_BASE_DIR) $(WMC_BASE)$(SEP)getopt.c
33 $(ECHO_CC)
34 ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $(WMC_BASE)$(SEP)getopt.c -o $(INTERMEDIATE)$(WMC_BASE)$(SEP)getopt.o
35
36 $(INTERMEDIATE)$(WMC_BASE)$(SEP)lang.o: $(WMC_BASE_DIR) $(WMC_BASE)$(SEP)lang.c
37 $(ECHO_CC)
38 ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $(WMC_BASE)$(SEP)lang.c -o $(INTERMEDIATE)$(WMC_BASE)$(SEP)lang.o
39
40 $(INTERMEDIATE)$(WMC_BASE)$(SEP)mcl.o: $(WMC_BASE_DIR) $(WMC_BASE)$(SEP)mcl.c
41 $(ECHO_CC)
42 ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $(WMC_BASE)$(SEP)mcl.c -o $(INTERMEDIATE)$(WMC_BASE)$(SEP)mcl.o
43
44 $(INTERMEDIATE)$(WMC_BASE)$(SEP)utils.o: $(WMC_BASE_DIR) $(WMC_BASE)$(SEP)utils.c
45 $(ECHO_CC)
46 ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $(WMC_BASE)$(SEP)utils.c -o $(INTERMEDIATE)$(WMC_BASE)$(SEP)utils.o
47
48 $(INTERMEDIATE)$(WMC_BASE)$(SEP)wmc.o: $(WMC_BASE_DIR) $(WMC_BASE)$(SEP)wmc.c
49 $(ECHO_CC)
50 ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $(WMC_BASE)$(SEP)wmc.c -o $(INTERMEDIATE)$(WMC_BASE)$(SEP)wmc.o
51
52 $(INTERMEDIATE)$(WMC_BASE)$(SEP)write.o: $(WMC_BASE_DIR) $(WMC_BASE)$(SEP)write.c
53 $(ECHO_CC)
54 ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $(WMC_BASE)$(SEP)write.c -o $(INTERMEDIATE)$(WMC_BASE)$(SEP)write.o
55
56 $(INTERMEDIATE)$(WMC_BASE)$(SEP)y_tab.o: $(WMC_BASE_DIR) $(WMC_BASE)$(SEP)y_tab.c
57 $(ECHO_CC)
58 ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $(WMC_BASE)$(SEP)y_tab.c -o $(INTERMEDIATE)$(WMC_BASE)$(SEP)y_tab.o
59
60 $(INTERMEDIATE)$(WMC_BASE)$(SEP)misc.o: $(WMC_BASE_DIR) $(WMC_BASE)$(SEP)misc.c
61 $(ECHO_CC)
62 ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $(WMC_BASE)$(SEP)misc.c -o $(INTERMEDIATE)$(WMC_BASE)$(SEP)misc.o
63
64 .PHONY: wmc_clean
65 wmc_clean:
66 -@$(rm) $(WMC_TARGET) $(WMC_OBJECTS) 2>$(NUL)
67 clean: wmc_clean