makefiles: Generate the dependencies line to avoid some code duplication.
[wine] / programs / winetest / Makefile.in
1 TOPSRCDIR = @top_srcdir@
2 TOPOBJDIR = ../..
3 SRCDIR    = @srcdir@
4 VPATH     = @srcdir@
5 MODULE    = winetest.exe
6 APPMODE   = -mconsole
7 IMPORTS   = comctl32 user32 gdi32 wsock32 kernel32
8
9 C_SRCS = \
10         gui.c \
11         main.c \
12         send.c \
13         util.c
14
15 RC_SRCS = \
16         winetest.rc
17
18 RC_BINSRC = winetest.rc
19 RC_BINARIES = wine.ico 
20
21 @MAKE_PROG_RULES@
22
23 # List of test executables (auto-generated by make_makefiles)
24
25 TESTBINS = \
26         advapi32_test.exe \
27         advpack_test.exe \
28         cabinet_test.exe \
29         comcat_test.exe \
30         comctl32_test.exe \
31         comdlg32_test.exe \
32         crypt32_test.exe \
33         d3d8_test.exe \
34         d3d9_test.exe \
35         ddraw_test.exe \
36         dinput_test.exe \
37         dnsapi_test.exe \
38         dsound_test.exe \
39         gdi32_test.exe \
40         hlink_test.exe \
41         infosoft_test.exe \
42         iphlpapi_test.exe \
43         kernel32_test.exe \
44         lz32_test.exe \
45         mapi32_test.exe \
46         mlang_test.exe \
47         msacm32_test.exe \
48         mscms_test.exe \
49         mshtml_test.exe \
50         msi_test.exe \
51         msvcrt_test.exe \
52         msvcrtd_test.exe \
53         msxml3_test.exe \
54         netapi32_test.exe \
55         ntdll_test.exe \
56         ole32_test.exe \
57         oleaut32_test.exe \
58         psapi_test.exe \
59         quartz_test.exe \
60         riched20_test.exe \
61         rpcrt4_test.exe \
62         rsabase_test.exe \
63         rsaenh_test.exe \
64         secur32_test.exe \
65         setupapi_test.exe \
66         shdocvw_test.exe \
67         shell32_test.exe \
68         shlwapi_test.exe \
69         urlmon_test.exe \
70         user32_test.exe \
71         usp10_test.exe \
72         uxtheme_test.exe \
73         version_test.exe \
74         wininet_test.exe \
75         winmm_test.exe \
76         winspool.drv_test.exe \
77         wintrust_test.exe \
78         ws2_32_test.exe
79
80 advapi32_test.exe: $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT)
81         cp $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
82 advpack_test.exe: $(DLLDIR)/advpack/tests/advpack_test.exe$(DLLEXT)
83         cp $(DLLDIR)/advpack/tests/advpack_test.exe$(DLLEXT) $@ && $(STRIP) $@
84 cabinet_test.exe: $(DLLDIR)/cabinet/tests/cabinet_test.exe$(DLLEXT)
85         cp $(DLLDIR)/cabinet/tests/cabinet_test.exe$(DLLEXT) $@ && $(STRIP) $@
86 comcat_test.exe: $(DLLDIR)/comcat/tests/comcat_test.exe$(DLLEXT)
87         cp $(DLLDIR)/comcat/tests/comcat_test.exe$(DLLEXT) $@ && $(STRIP) $@
88 comctl32_test.exe: $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT)
89         cp $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT) $@ && $(STRIP) $@
90 comdlg32_test.exe: $(DLLDIR)/comdlg32/tests/comdlg32_test.exe$(DLLEXT)
91         cp $(DLLDIR)/comdlg32/tests/comdlg32_test.exe$(DLLEXT) $@ && $(STRIP) $@
92 crypt32_test.exe: $(DLLDIR)/crypt32/tests/crypt32_test.exe$(DLLEXT)
93         cp $(DLLDIR)/crypt32/tests/crypt32_test.exe$(DLLEXT) $@ && $(STRIP) $@
94 d3d8_test.exe: $(DLLDIR)/d3d8/tests/d3d8_test.exe$(DLLEXT)
95         cp $(DLLDIR)/d3d8/tests/d3d8_test.exe$(DLLEXT) $@ && $(STRIP) $@
96 d3d9_test.exe: $(DLLDIR)/d3d9/tests/d3d9_test.exe$(DLLEXT)
97         cp $(DLLDIR)/d3d9/tests/d3d9_test.exe$(DLLEXT) $@ && $(STRIP) $@
98 ddraw_test.exe: $(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT)
99         cp $(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT) $@ && $(STRIP) $@
100 dinput_test.exe: $(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT)
101         cp $(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT) $@ && $(STRIP) $@
102 dnsapi_test.exe: $(DLLDIR)/dnsapi/tests/dnsapi_test.exe$(DLLEXT)
103         cp $(DLLDIR)/dnsapi/tests/dnsapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
104 dsound_test.exe: $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT)
105         cp $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT) $@ && $(STRIP) $@
106 gdi32_test.exe: $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT)
107         cp $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
108 hlink_test.exe: $(DLLDIR)/hlink/tests/hlink_test.exe$(DLLEXT)
109         cp $(DLLDIR)/hlink/tests/hlink_test.exe$(DLLEXT) $@ && $(STRIP) $@
110 infosoft_test.exe: $(DLLDIR)/infosoft/tests/infosoft_test.exe$(DLLEXT)
111         cp $(DLLDIR)/infosoft/tests/infosoft_test.exe$(DLLEXT) $@ && $(STRIP) $@
112 iphlpapi_test.exe: $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT)
113         cp $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
114 kernel32_test.exe: $(DLLDIR)/kernel32/tests/kernel32_test.exe$(DLLEXT)
115         cp $(DLLDIR)/kernel32/tests/kernel32_test.exe$(DLLEXT) $@ && $(STRIP) $@
116 lz32_test.exe: $(DLLDIR)/lz32/tests/lz32_test.exe$(DLLEXT)
117         cp $(DLLDIR)/lz32/tests/lz32_test.exe$(DLLEXT) $@ && $(STRIP) $@
118 mapi32_test.exe: $(DLLDIR)/mapi32/tests/mapi32_test.exe$(DLLEXT)
119         cp $(DLLDIR)/mapi32/tests/mapi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
120 mlang_test.exe: $(DLLDIR)/mlang/tests/mlang_test.exe$(DLLEXT)
121         cp $(DLLDIR)/mlang/tests/mlang_test.exe$(DLLEXT) $@ && $(STRIP) $@
122 msacm32_test.exe: $(DLLDIR)/msacm32/tests/msacm32_test.exe$(DLLEXT)
123         cp $(DLLDIR)/msacm32/tests/msacm32_test.exe$(DLLEXT) $@ && $(STRIP) $@
124 mscms_test.exe: $(DLLDIR)/mscms/tests/mscms_test.exe$(DLLEXT)
125         cp $(DLLDIR)/mscms/tests/mscms_test.exe$(DLLEXT) $@ && $(STRIP) $@
126 mshtml_test.exe: $(DLLDIR)/mshtml/tests/mshtml_test.exe$(DLLEXT)
127         cp $(DLLDIR)/mshtml/tests/mshtml_test.exe$(DLLEXT) $@ && $(STRIP) $@
128 msi_test.exe: $(DLLDIR)/msi/tests/msi_test.exe$(DLLEXT)
129         cp $(DLLDIR)/msi/tests/msi_test.exe$(DLLEXT) $@ && $(STRIP) $@
130 msvcrt_test.exe: $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT)
131         cp $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT) $@ && $(STRIP) $@
132 msvcrtd_test.exe: $(DLLDIR)/msvcrtd/tests/msvcrtd_test.exe$(DLLEXT)
133         cp $(DLLDIR)/msvcrtd/tests/msvcrtd_test.exe$(DLLEXT) $@ && $(STRIP) $@
134 msxml3_test.exe: $(DLLDIR)/msxml3/tests/msxml3_test.exe$(DLLEXT)
135         cp $(DLLDIR)/msxml3/tests/msxml3_test.exe$(DLLEXT) $@ && $(STRIP) $@
136 netapi32_test.exe: $(DLLDIR)/netapi32/tests/netapi32_test.exe$(DLLEXT)
137         cp $(DLLDIR)/netapi32/tests/netapi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
138 ntdll_test.exe: $(DLLDIR)/ntdll/tests/ntdll_test.exe$(DLLEXT)
139         cp $(DLLDIR)/ntdll/tests/ntdll_test.exe$(DLLEXT) $@ && $(STRIP) $@
140 ole32_test.exe: $(DLLDIR)/ole32/tests/ole32_test.exe$(DLLEXT)
141         cp $(DLLDIR)/ole32/tests/ole32_test.exe$(DLLEXT) $@ && $(STRIP) $@
142 oleaut32_test.exe: $(DLLDIR)/oleaut32/tests/oleaut32_test.exe$(DLLEXT)
143         cp $(DLLDIR)/oleaut32/tests/oleaut32_test.exe$(DLLEXT) $@ && $(STRIP) $@
144 psapi_test.exe: $(DLLDIR)/psapi/tests/psapi_test.exe$(DLLEXT)
145         cp $(DLLDIR)/psapi/tests/psapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
146 quartz_test.exe: $(DLLDIR)/quartz/tests/quartz_test.exe$(DLLEXT)
147         cp $(DLLDIR)/quartz/tests/quartz_test.exe$(DLLEXT) $@ && $(STRIP) $@
148 riched20_test.exe: $(DLLDIR)/riched20/tests/riched20_test.exe$(DLLEXT)
149         cp $(DLLDIR)/riched20/tests/riched20_test.exe$(DLLEXT) $@ && $(STRIP) $@
150 rpcrt4_test.exe: $(DLLDIR)/rpcrt4/tests/rpcrt4_test.exe$(DLLEXT)
151         cp $(DLLDIR)/rpcrt4/tests/rpcrt4_test.exe$(DLLEXT) $@ && $(STRIP) $@
152 rsabase_test.exe: $(DLLDIR)/rsabase/tests/rsabase_test.exe$(DLLEXT)
153         cp $(DLLDIR)/rsabase/tests/rsabase_test.exe$(DLLEXT) $@ && $(STRIP) $@
154 rsaenh_test.exe: $(DLLDIR)/rsaenh/tests/rsaenh_test.exe$(DLLEXT)
155         cp $(DLLDIR)/rsaenh/tests/rsaenh_test.exe$(DLLEXT) $@ && $(STRIP) $@
156 secur32_test.exe: $(DLLDIR)/secur32/tests/secur32_test.exe$(DLLEXT)
157         cp $(DLLDIR)/secur32/tests/secur32_test.exe$(DLLEXT) $@ && $(STRIP) $@
158 setupapi_test.exe: $(DLLDIR)/setupapi/tests/setupapi_test.exe$(DLLEXT)
159         cp $(DLLDIR)/setupapi/tests/setupapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
160 shdocvw_test.exe: $(DLLDIR)/shdocvw/tests/shdocvw_test.exe$(DLLEXT)
161         cp $(DLLDIR)/shdocvw/tests/shdocvw_test.exe$(DLLEXT) $@ && $(STRIP) $@
162 shell32_test.exe: $(DLLDIR)/shell32/tests/shell32_test.exe$(DLLEXT)
163         cp $(DLLDIR)/shell32/tests/shell32_test.exe$(DLLEXT) $@ && $(STRIP) $@
164 shlwapi_test.exe: $(DLLDIR)/shlwapi/tests/shlwapi_test.exe$(DLLEXT)
165         cp $(DLLDIR)/shlwapi/tests/shlwapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
166 urlmon_test.exe: $(DLLDIR)/urlmon/tests/urlmon_test.exe$(DLLEXT)
167         cp $(DLLDIR)/urlmon/tests/urlmon_test.exe$(DLLEXT) $@ && $(STRIP) $@
168 user32_test.exe: $(DLLDIR)/user/tests/user32_test.exe$(DLLEXT)
169         cp $(DLLDIR)/user/tests/user32_test.exe$(DLLEXT) $@ && $(STRIP) $@
170 usp10_test.exe: $(DLLDIR)/usp10/tests/usp10_test.exe$(DLLEXT)
171         cp $(DLLDIR)/usp10/tests/usp10_test.exe$(DLLEXT) $@ && $(STRIP) $@
172 uxtheme_test.exe: $(DLLDIR)/uxtheme/tests/uxtheme_test.exe$(DLLEXT)
173         cp $(DLLDIR)/uxtheme/tests/uxtheme_test.exe$(DLLEXT) $@ && $(STRIP) $@
174 version_test.exe: $(DLLDIR)/version/tests/version_test.exe$(DLLEXT)
175         cp $(DLLDIR)/version/tests/version_test.exe$(DLLEXT) $@ && $(STRIP) $@
176 wininet_test.exe: $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT)
177         cp $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT) $@ && $(STRIP) $@
178 winmm_test.exe: $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT)
179         cp $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT) $@ && $(STRIP) $@
180 winspool.drv_test.exe: $(DLLDIR)/winspool.drv/tests/winspool.drv_test.exe$(DLLEXT)
181         cp $(DLLDIR)/winspool.drv/tests/winspool.drv_test.exe$(DLLEXT) $@ && $(STRIP) $@
182 wintrust_test.exe: $(DLLDIR)/wintrust/tests/wintrust_test.exe$(DLLEXT)
183         cp $(DLLDIR)/wintrust/tests/wintrust_test.exe$(DLLEXT) $@ && $(STRIP) $@
184 ws2_32_test.exe: $(DLLDIR)/ws2_32/tests/ws2_32_test.exe$(DLLEXT)
185         cp $(DLLDIR)/ws2_32/tests/ws2_32_test.exe$(DLLEXT) $@ && $(STRIP) $@
186
187 # Special rules
188
189 winetest.res: $(TESTBINS)
190
191 clean::
192         $(RM) tests.rc dist.res winetest-dist winetest-dist.exe $(TESTBINS)
193
194 # Rules for building distributable executable
195
196 .PHONY: dist
197
198 dist: winetest-dist.exe$(DLLEXT) winetest-dist$(EXEEXT)
199
200 winetest-dist.exe.so: $(OBJS) dist.res Makefile.in
201         $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) dist.res -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
202
203 winetest-dist: $(WINEWRAPPER)
204         $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
205
206 winetest-dist.exe: $(OBJS) dist.res.o Makefile.in
207         $(CC) $(APPMODE) $(OBJS) dist.res.o -o $@ $(DELAYIMPORTS:%=-l%) $(ALL_LIBS)
208
209 tests.rc: maketest Makefile.in
210         $(SRCDIR)/maketest $(TOPSRCDIR) > $@ || ($(RM) $@ && exit 1)
211
212 dist.res: winetest.rc tests.rc build.id build.nfo tests.url $(TESTBINS) $(RC_BINARIES)
213
214 @DEPENDENCIES@  # everything below this line is overwritten by make depend