makefiles: Avoid creating an intermediate rc file for test binaries.
[wine] / programs / winetest / Makefile.in
1 MODULE    = winetest.exe
2 APPMODE   = -mconsole
3 IMPORTS   = uuid comctl32 version user32 gdi32 advapi32 wsock32
4 DELAYIMPORTS = ole32
5
6 C_SRCS = \
7         gui.c \
8         main.c \
9         send.c \
10         util.c
11
12 RC_SRCS = \
13         winetest.rc
14
15 SVG_SRCS = winetest.svg
16
17 TESTBINS   = @ALL_TEST_BINARIES@
18 EXTRA_OBJS = build.res $(TESTBINS:.exe=.res)
19
20 @MAKE_PROG_RULES@
21
22 clean::
23         $(RM) build.rc build.nfo winetest-dist.exe $(TESTBINS)
24
25 build.rc: dummy
26         build="BUILD_INFO STRINGRES build.nfo STRINGTABLE { 1 \"`GIT_DIR=$(top_srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || ($(RM) $@ && exit 1)
27
28 build.nfo:
29         -$(CC) -v 2>$@
30
31 build.res: build.nfo
32
33 # Rules for building distributable executable
34
35 .PHONY: dist
36
37 dist: winetest-dist.exe$(DLLEXT)
38
39 winetest-dist.exe$(DLLEXT): winetest.exe$(DLLEXT)
40         cp winetest.exe$(DLLEXT) $@
41         -upx -9 -qqq $@
42
43 @ALL_WINETEST_DEPENDS@