e6394c881b0f50b52118a8edab5112669aee4dee
[reactos.git] / reactos / tools / buildno / buildno.mak
1 BUILDNO_BASE = $(TOOLS_BASE_)buildno
2 BUILDNO_BASE_ = $(BUILDNO_BASE)$(SEP)
3 BUILDNO_INT = $(INTERMEDIATE_)$(BUILDNO_BASE)
4 BUILDNO_INT_ = $(BUILDNO_INT)$(SEP)
5 BUILDNO_OUT = $(OUTPUT_)$(BUILDNO_BASE)
6 BUILDNO_OUT_ = $(BUILDNO_OUT)$(SEP)
7
8 $(BUILDNO_INT): | $(TOOLS_INT)
9 $(ECHO_MKDIR)
10 ${mkdir} $@
11
12 ifneq ($(INTERMEDIATE),$(OUTPUT))
13 $(BUILDNO_OUT): | $(TOOLS_OUT)
14 $(ECHO_MKDIR)
15 ${mkdir} $@
16 endif
17
18 BUILDNO_TARGET = \
19 $(EXEPREFIX)$(BUILDNO_OUT_)buildno$(EXEPOSTFIX)
20
21 BUILDNO_SOURCES = $(addprefix $(BUILDNO_BASE_), \
22 buildno.cpp \
23 )
24
25 BUILDNO_OBJECTS = \
26 $(addprefix $(INTERMEDIATE_), $(BUILDNO_SOURCES:.cpp=.o))
27
28 BUILDNO_HOST_CXXFLAGS = -I$(TOOLS_BASE) -Iinclude/reactos $(TOOLS_CPPFLAGS)
29
30 BUILDNO_HOST_LFLAGS = $(TOOLS_LFLAGS)
31
32 .PHONY: buildno
33 buildno: $(BUILDNO_TARGET)
34
35 $(BUILDNO_TARGET): $(BUILDNO_OBJECTS) $(XML_SSPRINTF_OBJECTS) | $(BUILDNO_OUT)
36 $(ECHO_LD)
37 ${host_gpp} $^ $(BUILDNO_HOST_LFLAGS) -o $@
38
39 $(BUILDNO_INT_)buildno.o: $(BUILDNO_BASE_)buildno.cpp | $(BUILDNO_INT)
40 $(ECHO_CC)
41 ${host_gpp} $(BUILDNO_HOST_CXXFLAGS) -c $< -o $@
42
43 .PHONY: buildno_clean
44 buildno_clean:
45 -@$(rm) $(BUILDNO_TARGET) $(BUILDNO_OBJECTS) 2>$(NUL)
46 clean: buildno_clean
47
48 $(BUILDNO_H): $(BUILDNO_TARGET)
49 ${mkdir} $(INTERMEDIATE_)include$(SEP)reactos 2>$(NUL)
50 $(ECHO_BUILDNO)
51 $(Q)$(BUILDNO_TARGET) $(BUILDNO_QUIET) $(BUILDNO_H)