0a9109bdcc3adcbc0f02fe6183a4c4a1674ff753
[reactos.git] / reactos / tools / buildno / buildno.mak
1 BUILDNO_BASE = $(TOOLS_BASE)$(SEP)buildno
2
3 BUILDNO_BASE_DIR = $(INTERMEDIATE)$(BUILDNO_BASE)
4 BUILDNO_BASE_DIR_EXISTS = $(BUILDNO_BASE_DIR)$(SEP)$(EXISTS)
5
6 $(BUILDNO_BASE_DIR_EXISTS): $(TOOLS_BASE_DIR_EXISTS)
7 $(ECHO_MKDIR)
8 ${mkdir} $(BUILDNO_BASE_DIR)
9 @echo. > $@
10
11 BUILDNO_TARGET = \
12 $(BUILDNO_BASE_DIR)$(SEP)buildno$(EXEPOSTFIX)
13
14 BUILDNO_SOURCES = \
15 $(BUILDNO_BASE)$(SEP)buildno.cpp \
16 $(BUILDNO_BASE)$(SEP)exception.cpp \
17 $(BUILDNO_BASE)$(SEP)ssprintf.cpp \
18 $(BUILDNO_BASE)$(SEP)XML.cpp
19
20 BUILDNO_OBJECTS = \
21 $(addprefix $(INTERMEDIATE), $(BUILDNO_SOURCES:.cpp=.o))
22
23 BUILDNO_HOST_CFLAGS = -Iinclude/reactos -g -Werror -Wall
24
25 BUILDNO_HOST_LFLAGS = -g
26
27 $(BUILDNO_TARGET): $(BUILDNO_OBJECTS)
28 $(ECHO_LD)
29 ${host_gpp} $(BUILDNO_OBJECTS) $(BUILDNO_HOST_LFLAGS) -o $(BUILDNO_TARGET)
30
31 $(BUILDNO_BASE_DIR)$(SEP)buildno.o: $(BUILDNO_BASE)$(SEP)buildno.cpp $(BUILDNO_BASE_DIR_EXISTS)
32 $(ECHO_CC)
33 ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
34
35 $(BUILDNO_BASE_DIR)$(SEP)exception.o: $(BUILDNO_BASE)$(SEP)exception.cpp $(BUILDNO_BASE_DIR_EXISTS)
36 $(ECHO_CC)
37 ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
38
39 $(BUILDNO_BASE_DIR)$(SEP)ssprintf.o: $(BUILDNO_BASE)$(SEP)ssprintf.cpp $(BUILDNO_BASE_DIR_EXISTS)
40 $(ECHO_CC)
41 ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
42
43 $(BUILDNO_BASE_DIR)$(SEP)XML.o: $(BUILDNO_BASE)$(SEP)XML.cpp $(BUILDNO_BASE_DIR_EXISTS)
44 $(ECHO_CC)
45 ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
46
47 .PHONY: buildno_clean
48 buildno_clean:
49 -@$(rm) $(BUILDNO_TARGET) $(BUILDNO_OBJECTS) 2>$(NUL)
50 clean: buildno_clean
51
52 $(BUILDNO_H): $(BUILDNO_TARGET)
53 $(BUILDNO_TARGET) $(BUILDNO_H)