92335e08d0c5c2bedaea157a3b0779b8fd865015
[reactos.git] / reactos / lib / inflib / inflib.mak
1 INFLIB_BASE = $(LIB_BASE_)inflib
2 INFLIB_BASE_ = $(INFLIB_BASE)$(SEP)
3 INFLIB_INT = $(INTERMEDIATE_)$(INFLIB_BASE)_host
4 INFLIB_INT_ = $(INTERMEDIATE_)$(INFLIB_BASE)_host$(SEP)
5 INFLIB_OUT = $(OUTPUT_)$(INFLIB_BASE)_host
6 INFLIB_OUT_ = $(OUTPUT_)$(INFLIB_BASE)_host$(SEP)
7
8 $(INFLIB_INT): | $(LIB_INT)
9 $(ECHO_MKDIR)
10 ${mkdir} $@
11
12 ifneq ($(INTERMEDIATE),$(OUTPUT))
13 $(INFLIB_OUT): | $(OUTPUT_)$(LIB_BASE)
14 $(ECHO_MKDIR)
15 ${mkdir} $@
16 endif
17
18 INFLIB_HOST_TARGET = \
19 $(INFLIB_OUT)$(SEP)inflib.a
20
21 INFLIB_HOST_SOURCES = $(addprefix $(INFLIB_BASE_), \
22 infcore.c \
23 infget.c \
24 infput.c \
25 infhostgen.c \
26 infhostget.c \
27 infhostglue.c \
28 infhostput.c \
29 )
30
31 INFLIB_HOST_OBJECTS = \
32 $(subst $(INFLIB_BASE), $(INFLIB_INT), $(INFLIB_HOST_SOURCES:.c=.o))
33
34 INFLIB_HOST_CFLAGS = -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
35 -Wstrict-prototypes -Wmissing-prototypes -DINFLIB_HOST -D_M_IX86 \
36 -I$(INFLIB_BASE) -Iinclude/reactos -DDBG
37
38 $(INFLIB_HOST_TARGET): $(INFLIB_HOST_OBJECTS) | $(INFLIB_OUT)
39 $(ECHO_AR)
40 $(host_ar) -r $@ $(INFLIB_HOST_OBJECTS)
41
42 $(INFLIB_INT_)infcore.o: $(INFLIB_BASE_)infcore.c | $(INFLIB_INT)
43 $(ECHO_CC)
44 ${host_gcc} $(INFLIB_HOST_CFLAGS) -c $< -o $@
45
46 $(INFLIB_INT_)infget.o: $(INFLIB_BASE_)infget.c | $(INFLIB_INT)
47 $(ECHO_CC)
48 ${host_gcc} $(INFLIB_HOST_CFLAGS) -c $< -o $@
49
50 $(INFLIB_INT_)infput.o: $(INFLIB_BASE_)infput.c | $(INFLIB_INT)
51 $(ECHO_CC)
52 ${host_gcc} $(INFLIB_HOST_CFLAGS) -c $< -o $@
53
54 $(INFLIB_INT_)infhostgen.o: $(INFLIB_BASE_)infhostgen.c | $(INFLIB_INT)
55 $(ECHO_CC)
56 ${host_gcc} $(INFLIB_HOST_CFLAGS) -c $< -o $@
57
58 $(INFLIB_INT_)infhostget.o: $(INFLIB_BASE_)infhostget.c | $(INFLIB_INT)
59 $(ECHO_CC)
60 ${host_gcc} $(INFLIB_HOST_CFLAGS) -c $< -o $@
61
62 $(INFLIB_INT_)infhostglue.o: $(INFLIB_BASE_)infhostglue.c | $(INFLIB_INT)
63 $(ECHO_CC)
64 ${host_gcc} $(INFLIB_HOST_CFLAGS) -c $< -o $@
65
66 $(INFLIB_INT_)infhostput.o: $(INFLIB_BASE_)infhostput.c | $(INFLIB_INT)
67 $(ECHO_CC)
68 ${host_gcc} $(INFLIB_HOST_CFLAGS) -c $< -o $@
69
70 .PHONY: inflib_host
71 inflib_host: $(INFLIB_HOST_TARGET)
72
73 .PHONY: inflib_host_clean
74 inflib_host_clean:
75 -@$(rm) $(INFLIB_HOST_TARGET) $(INFLIB_HOST_OBJECTS) 2>$(NUL)
76 clean: inflib_host_clean