Fix some build files
[reactos.git] / reactos / tools / gendib / gendib.mak
1 GENDIB_BASE = $(TOOLS_BASE_)gendib
2 GENDIB_BASE_ = $(GENDIB_BASE)$(SEP)
3 GENDIB_INT = $(INTERMEDIATE_)$(GENDIB_BASE)
4 GENDIB_INT_ = $(GENDIB_INT)$(SEP)
5 GENDIB_OUT = $(OUTPUT_)$(GENDIB_BASE)
6 GENDIB_OUT_ = $(GENDIB_OUT)$(SEP)
7
8 $(GENDIB_INT): | $(TOOLS_INT)
9 $(ECHO_MKDIR)
10 ${mkdir} $@
11
12 ifneq ($(INTERMEDIATE),$(OUTPUT))
13 $(GENDIB_OUT): | $(TOOLS_OUT)
14 $(ECHO_MKDIR)
15 ${mkdir} $@
16 endif
17
18 GENDIB_TARGET = \
19 $(EXEPREFIX)$(GENDIB_OUT_)gendib$(EXEPOSTFIX)
20
21 GENDIB_SOURCES = \
22 $(GENDIB_BASE_)gendib.c
23
24 GENDIB_OBJECTS = \
25 $(addprefix $(INTERMEDIATE_), $(GENDIB_SOURCES:.c=.o))
26
27 GENDIB_HOST_CFLAGS = $(TOOLS_CFLAGS)
28
29 GENDIB_HOST_LFLAGS = $(TOOLS_LFLAGS)
30
31 $(GENDIB_TARGET): $(GENDIB_OBJECTS) | $(GENDIB_OUT)
32 $(ECHO_LD)
33 ${host_gcc} $(GENDIB_OBJECTS) $(GENDIB_HOST_LFLAGS) -o $@
34
35 $(GENDIB_INT_)gendib.o: $(GENDIB_BASE_)gendib.c | $(GENDIB_INT)
36 $(ECHO_CC)
37 ${host_gcc} $(GENDIB_HOST_CFLAGS) -c $< -o $@
38
39 .PHONY: gendib_clean
40 gendib_clean:
41 -@$(rm) $(GENDIB_TARGET) $(GENDIB_OBJECTS) 2>$(NUL)
42 clean: gendib_clean
43
44 GENDIB_DIB_DIR = subsystems$(SEP)win32$(SEP)win32k$(SEP)dib
45
46 GENDIB_DIB_FILES = \
47 $(GENDIB_DIB_DIR)$(SEP)dib32gen.c \
48 $(GENDIB_DIB_DIR)$(SEP)dib16gen.c \
49 $(GENDIB_DIB_DIR)$(SEP)dib8gen.c
50
51 $(GENDIB_DIB_FILES): $(GENDIB_TARGET)
52 $(ECHO_GENDIB)
53 $(Q)$(GENDIB_TARGET) $(GENDIB_DIB_DIR)