TOPSRCDIR = ../..
TOPOBJDIR = ../..
SRCDIR    = .

MODULE    = winetest.exe
APPMODE   = -mconsole
IMPORTS   = comctl32 user32 gdi32 wsock32 kernel32

C_SRCS = \
	gui.c \
	main.c \
	send.c \
	util.c

RC_SRCS = \
	winetest.rc

RC_BINSRC = winetest.rc
RC_BINARIES = wine.ico 

XFILES = ddraw_test.exe$(DLLEXT)
OPENGLFILES = d3d9_test.exe$(DLLEXT)

TESTBINS = \
	$(OPENGLFILES) \
	$(XFILES) \
	advpack_test.exe$(DLLEXT) \
	advapi32_test.exe$(DLLEXT) \
	cabinet_test.exe$(DLLEXT) \
	comctl32_test.exe$(DLLEXT) \
	crypt32_test.exe$(DLLEXT) \
	dinput_test.exe$(DLLEXT) \
	dsound_test.exe$(DLLEXT) \
	gdi32_test.exe$(DLLEXT) \
	iphlpapi_test.exe$(DLLEXT) \
	kernel32_test.exe$(DLLEXT) \
	lz32_test.exe$(DLLEXT) \
	mapi32_test.exe$(DLLEXT) \
	mlang_test.exe$(DLLEXT) \
	msacm32_test.exe$(DLLEXT) \
	mscms_test.exe$(DLLEXT) \
	mshtml_test.exe$(DLLEXT) \
	msi_test.exe$(DLLEXT) \
	msvcrt_test.exe$(DLLEXT) \
	msvcrtd_test.exe$(DLLEXT) \
	msxml3_test.exe$(DLLEXT) \
	netapi32_test.exe$(DLLEXT) \
	ntdll_test.exe$(DLLEXT) \
	ole32_test.exe$(DLLEXT) \
	oleaut32_test.exe$(DLLEXT) \
	psapi_test.exe$(DLLEXT) \
	quartz_test.exe$(DLLEXT) \
	riched20_test.exe$(DLLEXT) \
	rpcrt4_test.exe$(DLLEXT) \
	rsabase_test.exe$(DLLEXT) \
	rsaenh_test.exe$(DLLEXT) \
	secur32_test.exe$(DLLEXT) \
	setupapi_test.exe$(DLLEXT) \
	shdocvw_test.exe$(DLLEXT) \
	shell32_test.exe$(DLLEXT) \
	shlwapi_test.exe$(DLLEXT) \
	urlmon_test.exe$(DLLEXT) \
	usp10_test.exe$(DLLEXT) \
	user32_test.exe$(DLLEXT) \
	version_test.exe$(DLLEXT) \
	wininet_test.exe$(DLLEXT) \
	winmm_test.exe$(DLLEXT) \
	winspool.drv_test.exe$(DLLEXT) \
	ws2_32_test.exe$(DLLEXT)


# Global rules for building a Winelib program     -*-Makefile-*-
#
# Each individual makefile should define the following variables:
# MODULE       : name of the main module being built
# APPMODE      : program mode (-mwindows,-mconsole)
# EXTRALIBS    : extra libraries to link in (optional)
# EXTRADEFS    : extra symbol definitions, like -DWINELIB (optional)
#
# plus all variables required by the global Make.rules.in
#

DLLDEFS     = 
DLLFLAGS    = -D_REENTRANT -fPIC
LDRPATH     = -Wl,--rpath,\$$ORIGIN/`$(RELPATH) $(dlldir) $(libdir)`
DEFS        = $(DLLDEFS) $(EXTRADEFS)
ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS)
ALL_LIBS    = $(ALL_IMPORTS:%=-l%) -L$(LIBDIR) -lwine $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
BASEMODULE  = $(MODULE:.exe=)
RUNTESTFLAGS= -q -P wine -T $(TOPOBJDIR)


# Global rules shared by all makefiles     -*-Makefile-*-
#
# Each individual makefile must define the following variables:
# TOPSRCDIR    : top-level source directory
# TOPOBJDIR    : top-level object directory
# SRCDIR       : source directory for this module
# MODULE       : name of the module being built
#
# Each individual makefile may define the following additional variables:
# C_SRCS       : C sources for the module
# C_SRCS16     : 16-bit C sources for the module
# RC_SRCS      : resource source files
# EXTRA_SRCS   : extra source files for make depend
# EXTRA_OBJS   : extra object files
# IMPORTS      : dlls to import
# DELAYIMPORTS : dlls to import in delayed mode
# SUBDIRS      : subdirectories that contain a Makefile
# EXTRASUBDIRS : subdirectories that do not contain a Makefile
# INSTALLSUBDIRS : subdirectories to run make install/uninstall into
# MODCFLAGS    : extra CFLAGS for this module

# First some useful definitions

SHELL     = /bin/sh
CC        = gcc
CFLAGS    = -g -O2
CPPFLAGS  = 
LIBS      = 
BISON     = bison
LEX       = flex
LEXLIB    = -lfl
EXEEXT    = 
OBJEXT    = o
LIBEXT    = so
DLLEXT    = .so
IMPLIBEXT = def
LDSHARED  = $(CC) -shared $(SONAME:%=-Wl,-soname,%) $(VERSCRIPT:%=-Wl,--version-script=%)
DLLTOOL   = false
DLLWRAP   = 
AR        = ar rc
RANLIB    = ranlib
STRIP     = strip
WINDRES   = false
LN        = ln
LN_S      = ln -s
TOOLSDIR  = $(TOPOBJDIR)
AS        = as
LD        = ld
LDFLAGS   = 
PRELINK   = prelink
RM        = rm -f
MV        = mv
LINT      = 
LINTFLAGS = 
FONTFORGE = fontforge
INCLUDES     = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
EXTRACFLAGS  = -Wall -pipe -fno-strict-aliasing -gstabs+ -Wdeclaration-after-statement -Wpointer-arith
ALLCFLAGS    = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) $(MODCFLAGS)
ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS)
IDLFLAGS     = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS)
WINEBUILDFLAGS = $(DLLFLAGS) --as-cmd "$(AS)"
MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755
WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi/winapi_check
WINEWRAPPER  = $(TOPSRCDIR)/tools/winewrapper
C2MAN        = $(TOPSRCDIR)/tools/c2man.pl
RUNTEST      = $(TOPSRCDIR)/tools/runtest
WINEBUILD    = $(TOOLSDIR)/tools/winebuild/winebuild
MAKEDEP      = $(TOOLSDIR)/tools/makedep
MAKECTESTS   = $(TOOLSDIR)/tools/make_ctests
WRC          = $(TOOLSDIR)/tools/wrc/wrc
BIN2RES      = $(TOOLSDIR)/tools/bin2res
WMC          = $(TOOLSDIR)/tools/wmc/wmc
WIDL         = $(TOOLSDIR)/tools/widl/widl
WINEGCC      = $(TOOLSDIR)/tools/winegcc/winegcc
RELPATH      = $(TOOLSDIR)/tools/relpath
SFNT2FNT     = $(TOOLSDIR)/tools/sfnt2fnt
FNT2FON      = $(TOOLSDIR)/tools/fnt2fon
RC           = $(WRC)
RC16         = $(WRC)
RCFLAGS      = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS)
RC16FLAGS    = -O res16 $(RCFLAGS)
LDPATH       = LD_LIBRARY_PATH="$(TOOLSDIR)/libs/unicode:$$LD_LIBRARY_PATH"
DLLDIR       = $(TOPOBJDIR)/dlls
LIBDIR       = $(TOPOBJDIR)/libs
LIBPORT      = -L$(TOPOBJDIR)/libs/port -lwine_port
LIBUNICODE   = -L$(TOPOBJDIR)/libs/unicode -lwine_unicode
LIBWINE      = -L$(TOPOBJDIR)/libs/wine -lwine



# Installation infos

INSTALL         = /usr/bin/install -c $(INSTALL_FLAGS)
INSTALL_PROGRAM = ${INSTALL} $(INSTALL_PROGRAM_FLAGS)
INSTALL_SCRIPT  = ${INSTALL} $(INSTALL_SCRIPT_FLAGS)
INSTALL_DATA    = ${INSTALL} -m 644 $(INSTALL_DATA_FLAGS)
prefix          = /usr/local
exec_prefix     = ${prefix}
bindir          = ${exec_prefix}/bin
libdir          = ${exec_prefix}/lib
datadir         = ${prefix}/share
infodir         = ${prefix}/info
mandir          = ${prefix}/man
sysconfdir      = ${prefix}/etc
includedir      = ${prefix}/include/wine
dlldir          = ${exec_prefix}/lib/wine
prog_manext     = 1
api_manext      = 3w
conf_manext     = 5
CLEAN_FILES     = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \
                  *.flc *.tab.c *.tab.h lex.yy.c core

OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS)

RCOBJS = $(RC_SRCS:.rc=.res.o)
LINTS  = $(C_SRCS:.c=.ln)

# Implicit rules

.SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.o .idl .tlb .h .ok .sfd .ttf .man.in .man

.c.o:
	$(CC) -c $(ALLCFLAGS) -o $@ $<

.s.o:
	$(AS) -o $@ $<

.mc.mc.rc:
	$(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $<

.rc.res:
	$(LDPATH) $(RC) $(RCFLAGS) -fo$@ $<

.res.res.o:
	$(WINDRES) -i $< -o $@

.spec.spec.o:
	$(WINEBUILD) $(WINEBUILDFLAGS) --dll -o $@ --main-module $(MODULE) --export $<

.idl.h:
	$(WIDL) $(IDLFLAGS) -h -H $@ $<

.idl.tlb:
	$(WIDL) $(IDLFLAGS) -t -T $@ $<

.c.ln:
	$(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )

.c.ok:
	$(RUNTEST) $(RUNTESTFLAGS) $< && touch $@

.sfd.ttf:
	$(FONTFORGE) -script $(TOPSRCDIR)/fonts/genttf.ff $< $@

.man.in.man:
	sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@PACKAGE_STRING\@,Wine 0.9.10,g' $< >$@ || ($(RM) $@ && false)

# 'all' target first in case the enclosing Makefile didn't define any target

all: Makefile

filter:
	@$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all

.PHONY: all filter

# Rules for resources

$(RC_BINARIES): $(BIN2RES) $(RC_BINSRC)
	$(BIN2RES) -f -o $@ $(SRCDIR)/$(RC_BINSRC)

$(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) $(RC_BINARIES) $(RC_TLB)

# Rules for makefile

Makefile: Makefile.in $(TOPSRCDIR)/configure
	@echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure
	@exit 1

# Rule for linting

$(MODULE).ln : $(LINTS)
	if test "$(LINTS)" ; \
	then \
		$(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \
	        $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \
	else \
		$(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \
	fi

lint:: $(MODULE).ln

# Rules for Windows API checking

winapi_check:: dummy
	$(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) .

.PHONY: winapi_check

# Rules for dependencies

$(SUBDIRS:%=%/__depend__): dummy
	cd `dirname $@` && $(MAKE) depend

depend: $(IDL_SRCS:.idl=.h) $(SUBDIRS:%=%/__depend__)
	$(MAKEDEP) $(INCLUDES) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS)

.PHONY: depend $(SUBDIRS:%=%/__depend__)

# Rules for cleaning

$(SUBDIRS:%=%/__clean__): dummy
	cd `dirname $@` && $(MAKE) clean

$(SUBDIRS:%=%/__testclean__): dummy
	cd `dirname $@` && $(MAKE) testclean

$(EXTRASUBDIRS:%=%/__clean__): dummy
	-cd `dirname $@` && $(RM) $(CLEAN_FILES)

testclean:: $(SUBDIRS:%=%/__testclean__)

clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
	$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(IDL_SRCS:.idl=.h) $(PROGRAMS) $(RC_BINARIES) $(RC_TLB) $(MANPAGES)

.PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__)

# Rules for installing

$(SUBDIRS:%=%/__install__): dummy
	cd `dirname $@` && $(MAKE) install

$(SUBDIRS:%=%/__install-lib__): dummy
	cd `dirname $@` && $(MAKE) install-lib

$(SUBDIRS:%=%/__install-dev__): dummy
	cd `dirname $@` && $(MAKE) install-dev

$(SUBDIRS:%=%/__uninstall__): dummy
	cd `dirname $@` && $(MAKE) uninstall

install:: $(INSTALLSUBDIRS:%=%/__install__)

uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)

.PHONY: install install-lib install-dev uninstall \
	$(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \
	$(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__)

# Rules for checking that no imports are missing

$(SUBDIRS:%=%/__checklink__): dummy
	@cd `dirname $@` && $(MAKE) checklink

.PHONY: checklink $(SUBDIRS:%=%/__checklink__)

# Rules for testing

$(SUBDIRS:%=%/__test__): dummy
	@cd `dirname $@` && $(MAKE) test

$(SUBDIRS:%=%/__crosstest__): dummy
	@cd `dirname $@` && $(MAKE) crosstest

.PHONY: check test crosstest $(SUBDIRS:%=%/__test__) $(SUBDIRS:%=%/__crosstest__)

# Misc. rules

$(MC_SRCS:.mc=.mc.rc): $(WMC)

$(IDL_SRCS:.idl=.h): $(WIDL)

$(RC_TLB:.idl=.tlb): $(WIDL)

$(SUBDIRS): dummy
	@cd $@ && $(MAKE)

dummy:

.PHONY: dummy $(SUBDIRS)

# End of global rules

all: $(MODULE)$(DLLEXT) $(BASEMODULE)$(EXEEXT)

# Rules for .so main module

$(MODULE).so: $(OBJS) $(RC_SRCS:.rc=.res) Makefile.in
	$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(LDRPATH) -L$(DLLDIR) $(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%)

$(BASEMODULE): $(WINEWRAPPER)
	$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@

# Rules for .exe main module

$(MODULE): $(OBJS) $(RCOBJS) Makefile.in
	$(CC) $(APPMODE) $(OBJS) $(RCOBJS) -o $@ $(ALL_LIBS)

# Rules for testing

check test:: $(SUBDIRS:%=%/__test__)

$(TESTRESULTS): $(MODULE)$(DLLEXT)

# Rules for installation

.PHONY: install_prog install_prog.so uninstall_prog uninstall_prog.so

install_prog.so: $(MODULE).so dummy
	$(MKINSTALLDIRS) $(DESTDIR)$(dlldir)
	$(INSTALL_PROGRAM) $(MODULE).so $(DESTDIR)$(dlldir)/$(MODULE).so

install_prog: $(MODULE) dummy
	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
	$(INSTALL_PROGRAM) $(MODULE) $(DESTDIR)$(bindir)/$(MODULE)

uninstall_prog.so: dummy
	$(RM) $(DESTDIR)$(dlldir)/$(MODULE).so

uninstall_prog: dummy
	$(RM) $(DESTDIR)$(bindir)/$(MODULE)

install:: install_prog$(DLLEXT)

uninstall:: uninstall_prog$(DLLEXT)

clean::
	$(RM) $(BASEMODULE) $(MODULE)

# Special rules

tests.rc: maketest Makefile.in
	$(SRCDIR)/maketest $(TOPSRCDIR) $(TESTBINS) > $@ || ( $(RM) $@ && exit 1 )

winetest.res: tests.rc $(TESTBINS)

clean::
	$(RM) tests.rc dist.res winetest-dist winetest-dist.exe $(TESTBINS)

depend: tests.rc

# Rules for building distributable executable

.PHONY: dist

dist: winetest-dist.exe$(DLLEXT) winetest-dist$(EXEEXT)

winetest-dist.exe.so: $(OBJS) dist.res Makefile.in
	$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) dist.res -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)

winetest-dist: $(WINEWRAPPER)
	$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@

winetest-dist.exe: $(OBJS) dist.res.o Makefile.in
	$(CC) $(APPMODE) $(OBJS) dist.res.o -o $@ $(DELAYIMPORTS:%=-l%) $(ALL_LIBS)

dist.res: winetest.rc tests.rc build.id build.nfo tests.url $(TESTBINS) $(RC_BINARIES)

# Rules for stripping the test executables

advpack_test.exe$(DLLEXT): $(DLLDIR)/advpack/tests/advpack_test.exe$(DLLEXT)
	cp $(DLLDIR)/advpack/tests/advpack_test.exe$(DLLEXT) $@ && $(STRIP) $@
advapi32_test.exe$(DLLEXT): $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT)
	cp $(DLLDIR)/advapi32/tests/advapi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
cabinet_test.exe$(DLLEXT): $(DLLDIR)/cabinet/tests/cabinet_test.exe$(DLLEXT)
	cp $(DLLDIR)/cabinet/tests/cabinet_test.exe$(DLLEXT) $@ && $(STRIP) $@
comctl32_test.exe$(DLLEXT): $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT)
	cp $(DLLDIR)/comctl32/tests/comctl32_test.exe$(DLLEXT) $@ && $(STRIP) $@
crypt32_test.exe$(DLLEXT): $(DLLDIR)/crypt32/tests/crypt32_test.exe$(DLLEXT)
	cp $(DLLDIR)/crypt32/tests/crypt32_test.exe$(DLLEXT) $@ && $(STRIP) $@
d3d9_test.exe$(DLLEXT): $(DLLDIR)/d3d9/tests/d3d9_test.exe$(DLLEXT)
	cp $(DLLDIR)/d3d9/tests/d3d9_test.exe$(DLLEXT) $@ && $(STRIP) $@
ddraw_test.exe$(DLLEXT): $(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT)
	cp $(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT) $@ && $(STRIP) $@
dinput_test.exe$(DLLEXT): $(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT)
	cp $(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT) $@ && $(STRIP) $@
dsound_test.exe$(DLLEXT): $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT)
	cp $(DLLDIR)/dsound/tests/dsound_test.exe$(DLLEXT) $@ && $(STRIP) $@
gdi32_test.exe$(DLLEXT): $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT)
	cp $(DLLDIR)/gdi/tests/gdi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
iphlpapi_test.exe$(DLLEXT): $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT)
	cp $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
kernel32_test.exe$(DLLEXT): $(DLLDIR)/kernel/tests/kernel32_test.exe$(DLLEXT)
	cp $(DLLDIR)/kernel/tests/kernel32_test.exe$(DLLEXT) $@ && $(STRIP) $@
lz32_test.exe$(DLLEXT): $(DLLDIR)/lz32/tests/lz32_test.exe$(DLLEXT)
	cp $(DLLDIR)/lz32/tests/lz32_test.exe$(DLLEXT) $@ && $(STRIP) $@
mapi32_test.exe$(DLLEXT): $(DLLDIR)/mapi32/tests/mapi32_test.exe$(DLLEXT)
	cp $(DLLDIR)/mapi32/tests/mapi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
mlang_test.exe$(DLLEXT): $(DLLDIR)/mlang/tests/mlang_test.exe$(DLLEXT)
	cp $(DLLDIR)/mlang/tests/mlang_test.exe$(DLLEXT) $@ && $(STRIP) $@
msacm32_test.exe$(DLLEXT): $(DLLDIR)/msacm/tests/msacm32_test.exe$(DLLEXT)
	cp $(DLLDIR)/msacm/tests/msacm32_test.exe$(DLLEXT) $@ && $(STRIP) $@
mscms_test.exe$(DLLEXT): $(DLLDIR)/mscms/tests/mscms_test.exe$(DLLEXT)
	cp $(DLLDIR)/mscms/tests/mscms_test.exe$(DLLEXT) $@ && $(STRIP) $@
mshtml_test.exe$(DLLEXT): $(DLLDIR)/mshtml/tests/mshtml_test.exe$(DLLEXT)
	cp $(DLLDIR)/mshtml/tests/mshtml_test.exe$(DLLEXT) $@ && $(STRIP) $@
msi_test.exe$(DLLEXT): $(DLLDIR)/msi/tests/msi_test.exe$(DLLEXT)
	cp $(DLLDIR)/msi/tests/msi_test.exe$(DLLEXT) $@ && $(STRIP) $@
msvcrt_test.exe$(DLLEXT): $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT)
	cp $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT) $@ && $(STRIP) $@
msvcrtd_test.exe$(DLLEXT): $(DLLDIR)/msvcrtd/tests/msvcrtd_test.exe$(DLLEXT)
	cp $(DLLDIR)/msvcrtd/tests/msvcrtd_test.exe$(DLLEXT) $@ && $(STRIP) $@
msxml3_test.exe$(DLLEXT): $(DLLDIR)/msxml3/tests/msxml3_test.exe$(DLLEXT)
	cp $(DLLDIR)/msxml3/tests/msxml3_test.exe$(DLLEXT) $@ && $(STRIP) $@
netapi32_test.exe$(DLLEXT): $(DLLDIR)/netapi32/tests/netapi32_test.exe$(DLLEXT)
	cp $(DLLDIR)/netapi32/tests/netapi32_test.exe$(DLLEXT) $@ && $(STRIP) $@
ntdll_test.exe$(DLLEXT): $(DLLDIR)/ntdll/tests/ntdll_test.exe$(DLLEXT)
	cp $(DLLDIR)/ntdll/tests/ntdll_test.exe$(DLLEXT) $@ && $(STRIP) $@
ole32_test.exe$(DLLEXT): $(DLLDIR)/ole32/tests/ole32_test.exe$(DLLEXT)
	cp $(DLLDIR)/ole32/tests/ole32_test.exe$(DLLEXT) $@ && $(STRIP) $@
oleaut32_test.exe$(DLLEXT): $(DLLDIR)/oleaut32/tests/oleaut32_test.exe$(DLLEXT)
	cp $(DLLDIR)/oleaut32/tests/oleaut32_test.exe$(DLLEXT) $@ && $(STRIP) $@
psapi_test.exe$(DLLEXT): $(DLLDIR)/psapi/tests/psapi_test.exe$(DLLEXT)
	cp $(DLLDIR)/psapi/tests/psapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
quartz_test.exe$(DLLEXT): $(DLLDIR)/quartz/tests/quartz_test.exe$(DLLEXT)
	cp $(DLLDIR)/quartz/tests/quartz_test.exe$(DLLEXT) $@ && $(STRIP) $@
riched20_test.exe$(DLLEXT): $(DLLDIR)/riched20/tests/riched20_test.exe$(DLLEXT)
	cp $(DLLDIR)/riched20/tests/riched20_test.exe$(DLLEXT) $@ && $(STRIP) $@
rpcrt4_test.exe$(DLLEXT): $(DLLDIR)/rpcrt4/tests/rpcrt4_test.exe$(DLLEXT)
	cp $(DLLDIR)/rpcrt4/tests/rpcrt4_test.exe$(DLLEXT) $@ && $(STRIP) $@
rsabase_test.exe$(DLLEXT): $(DLLDIR)/rsabase/tests/rsabase_test.exe$(DLLEXT)
	cp $(DLLDIR)/rsabase/tests/rsabase_test.exe$(DLLEXT) $@ && $(STRIP) $@
rsaenh_test.exe$(DLLEXT): $(DLLDIR)/rsaenh/tests/rsaenh_test.exe$(DLLEXT)
	cp $(DLLDIR)/rsaenh/tests/rsaenh_test.exe$(DLLEXT) $@ && $(STRIP) $@
secur32_test.exe$(DLLEXT): $(DLLDIR)/secur32/tests/secur32_test.exe$(DLLEXT)
	cp $(DLLDIR)/secur32/tests/secur32_test.exe$(DLLEXT) $@ && $(STRIP) $@
setupapi_test.exe$(DLLEXT): $(DLLDIR)/setupapi/tests/setupapi_test.exe$(DLLEXT)
	cp $(DLLDIR)/setupapi/tests/setupapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
shdocvw_test.exe$(DLLEXT): $(DLLDIR)/shdocvw/tests/shdocvw_test.exe$(DLLEXT)
	cp $(DLLDIR)/shdocvw/tests/shdocvw_test.exe$(DLLEXT) $@ && $(STRIP) $@
shell32_test.exe$(DLLEXT): $(DLLDIR)/shell32/tests/shell32_test.exe$(DLLEXT)
	cp $(DLLDIR)/shell32/tests/shell32_test.exe$(DLLEXT) $@ && $(STRIP) $@
shlwapi_test.exe$(DLLEXT): $(DLLDIR)/shlwapi/tests/shlwapi_test.exe$(DLLEXT)
	cp $(DLLDIR)/shlwapi/tests/shlwapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
urlmon_test.exe$(DLLEXT): $(DLLDIR)/urlmon/tests/urlmon_test.exe$(DLLEXT)
	cp $(DLLDIR)/urlmon/tests/urlmon_test.exe$(DLLEXT) $@ && $(STRIP) $@
usp10_test.exe$(DLLEXT): $(DLLDIR)/usp10/tests/usp10_test.exe$(DLLEXT)
	cp $(DLLDIR)/usp10/tests/usp10_test.exe$(DLLEXT) $@ && $(STRIP) $@
user32_test.exe$(DLLEXT): $(DLLDIR)/user/tests/user32_test.exe$(DLLEXT)
	cp $(DLLDIR)/user/tests/user32_test.exe$(DLLEXT) $@ && $(STRIP) $@
wininet_test.exe$(DLLEXT): $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT)
	cp $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT) $@ && $(STRIP) $@
version_test.exe$(DLLEXT): $(DLLDIR)/version/tests/version_test.exe$(DLLEXT)
	cp $(DLLDIR)/version/tests/version_test.exe$(DLLEXT) $@ && $(STRIP) $@
winmm_test.exe$(DLLEXT): $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT)
	cp $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT) $@ && $(STRIP) $@
winspool.drv_test.exe$(DLLEXT): $(DLLDIR)/winspool/tests/winspool.drv_test.exe$(DLLEXT)
	cp $(DLLDIR)/winspool/tests/winspool.drv_test.exe$(DLLEXT) $@ && $(STRIP) $@
ws2_32_test.exe$(DLLEXT): $(DLLDIR)/ws2_32/tests/ws2_32_test.exe$(DLLEXT)
	cp $(DLLDIR)/ws2_32/tests/ws2_32_test.exe$(DLLEXT) $@ && $(STRIP) $@

### Dependencies:
gui.o: gui.c ../../include/windows.h ../../include/winresrc.h \
 ../../include/winuser.h ../../include/pshpack2.h \
 ../../include/poppack.h ../../include/commctrl.h \
 ../../include/prsht.h ../../include/pshpack1.h ../../include/dde.h \
 ../../include/windef.h ../../include/winnt.h ../../include/basetsd.h \
 ../../include/pshpack4.h ../../include/guiddef.h \
 ../../include/pshpack8.h ../../include/dlgs.h ../../include/winver.h \
 ../../include/excpt.h ../../include/winbase.h \
 ../../include/winerror.h ../../include/wingdi.h \
 ../../include/winnls.h ../../include/wincon.h ../../include/winreg.h \
 ../../include/reason.h ../../include/winnetwk.h ../../include/cderr.h \
 ../../include/ddeml.h ../../include/lzexpand.h \
 ../../include/mmsystem.h ../../include/nb30.h ../../include/rpc.h \
 ../../include/rpcdce.h ../../include/rpcdcep.h \
 ../../include/rpcnterr.h ../../include/shellapi.h \
 ../../include/winsock2.h ../../include/winsock.h \
 ../../include/wincrypt.h ../../include/winspool.h \
 ../../include/ole2.h ../../include/objbase.h ../../include/rpcndr.h \
 ../../include/objidl.h ../../include/unknwn.h ../../include/wtypes.h \
 ../../include/cguid.h ../../include/propidl.h ../../include/oaidl.h \
 ../../include/oleauto.h ../../include/oleidl.h \
 ../../include/commdlg.h ../../include/winsvc.h ../../include/mcx.h \
 ../../include/imm.h ./resource.h ./winetest.h
main.o: main.c ../../include/config.h ../../include/wine/port.h \
 ../../include/windows.h ../../include/winresrc.h \
 ../../include/winuser.h ../../include/pshpack2.h \
 ../../include/poppack.h ../../include/commctrl.h \
 ../../include/prsht.h ../../include/pshpack1.h ../../include/dde.h \
 ../../include/windef.h ../../include/winnt.h ../../include/basetsd.h \
 ../../include/pshpack4.h ../../include/guiddef.h \
 ../../include/pshpack8.h ../../include/dlgs.h ../../include/winver.h \
 ../../include/excpt.h ../../include/winbase.h \
 ../../include/winerror.h ../../include/wingdi.h \
 ../../include/winnls.h ../../include/wincon.h ../../include/winreg.h \
 ../../include/reason.h ../../include/winnetwk.h ../../include/cderr.h \
 ../../include/ddeml.h ../../include/lzexpand.h \
 ../../include/mmsystem.h ../../include/nb30.h ../../include/rpc.h \
 ../../include/rpcdce.h ../../include/rpcdcep.h \
 ../../include/rpcnterr.h ../../include/shellapi.h \
 ../../include/winsock2.h ../../include/winsock.h \
 ../../include/wincrypt.h ../../include/winspool.h \
 ../../include/ole2.h ../../include/objbase.h ../../include/rpcndr.h \
 ../../include/objidl.h ../../include/unknwn.h ../../include/wtypes.h \
 ../../include/cguid.h ../../include/propidl.h ../../include/oaidl.h \
 ../../include/oleauto.h ../../include/oleidl.h \
 ../../include/commdlg.h ../../include/winsvc.h ../../include/mcx.h \
 ../../include/imm.h ./winetest.h ./resource.h
send.o: send.c ../../include/winsock.h ../../include/windows.h \
 ../../include/winresrc.h ../../include/winuser.h \
 ../../include/pshpack2.h ../../include/poppack.h \
 ../../include/commctrl.h ../../include/prsht.h \
 ../../include/pshpack1.h ../../include/dde.h ../../include/windef.h \
 ../../include/winnt.h ../../include/basetsd.h \
 ../../include/pshpack4.h ../../include/guiddef.h \
 ../../include/pshpack8.h ../../include/dlgs.h ../../include/winver.h \
 ../../include/excpt.h ../../include/winbase.h \
 ../../include/winerror.h ../../include/wingdi.h \
 ../../include/winnls.h ../../include/wincon.h ../../include/winreg.h \
 ../../include/reason.h ../../include/winnetwk.h ../../include/cderr.h \
 ../../include/ddeml.h ../../include/lzexpand.h \
 ../../include/mmsystem.h ../../include/nb30.h ../../include/rpc.h \
 ../../include/rpcdce.h ../../include/rpcdcep.h \
 ../../include/rpcnterr.h ../../include/shellapi.h \
 ../../include/winsock2.h ../../include/wincrypt.h \
 ../../include/winspool.h ../../include/ole2.h ../../include/objbase.h \
 ../../include/rpcndr.h ../../include/objidl.h ../../include/unknwn.h \
 ../../include/wtypes.h ../../include/cguid.h ../../include/propidl.h \
 ../../include/oaidl.h ../../include/oleauto.h ../../include/oleidl.h \
 ../../include/commdlg.h ../../include/winsvc.h ../../include/mcx.h \
 ../../include/imm.h ./winetest.h
util.o: util.c ./winetest.h ../../include/windows.h \
 ../../include/winresrc.h ../../include/winuser.h \
 ../../include/pshpack2.h ../../include/poppack.h \
 ../../include/commctrl.h ../../include/prsht.h \
 ../../include/pshpack1.h ../../include/dde.h ../../include/windef.h \
 ../../include/winnt.h ../../include/basetsd.h \
 ../../include/pshpack4.h ../../include/guiddef.h \
 ../../include/pshpack8.h ../../include/dlgs.h ../../include/winver.h \
 ../../include/excpt.h ../../include/winbase.h \
 ../../include/winerror.h ../../include/wingdi.h \
 ../../include/winnls.h ../../include/wincon.h ../../include/winreg.h \
 ../../include/reason.h ../../include/winnetwk.h ../../include/cderr.h \
 ../../include/ddeml.h ../../include/lzexpand.h \
 ../../include/mmsystem.h ../../include/nb30.h ../../include/rpc.h \
 ../../include/rpcdce.h ../../include/rpcdcep.h \
 ../../include/rpcnterr.h ../../include/shellapi.h \
 ../../include/winsock2.h ../../include/winsock.h \
 ../../include/wincrypt.h ../../include/winspool.h \
 ../../include/ole2.h ../../include/objbase.h ../../include/rpcndr.h \
 ../../include/objidl.h ../../include/unknwn.h ../../include/wtypes.h \
 ../../include/cguid.h ../../include/propidl.h ../../include/oaidl.h \
 ../../include/oleauto.h ../../include/oleidl.h \
 ../../include/commdlg.h ../../include/winsvc.h ../../include/mcx.h \
 ../../include/imm.h
winetest.res: winetest.rc ../../include/windows.h \
 ../../include/winresrc.h ../../include/winuser.h \
 ../../include/pshpack2.h ../../include/poppack.h \
 ../../include/commctrl.h ../../include/prsht.h \
 ../../include/pshpack1.h ../../include/dde.h ../../include/windef.h \
 ../../include/winnt.h ../../include/basetsd.h \
 ../../include/pshpack4.h ../../include/guiddef.h \
 ../../include/pshpack8.h ../../include/dlgs.h ../../include/winver.h \
 ../../include/excpt.h ../../include/winbase.h \
 ../../include/winerror.h ../../include/wingdi.h \
 ../../include/winnls.h ../../include/wincon.h ../../include/winreg.h \
 ../../include/reason.h ../../include/winnetwk.h ../../include/cderr.h \
 ../../include/ddeml.h ../../include/lzexpand.h \
 ../../include/mmsystem.h ../../include/nb30.h ../../include/rpc.h \
 ../../include/rpcdce.h ../../include/rpcdcep.h \
 ../../include/rpcnterr.h ../../include/shellapi.h \
 ../../include/winsock2.h ../../include/winsock.h \
 ../../include/wincrypt.h ../../include/winspool.h \
 ../../include/ole2.h ../../include/objbase.h ../../include/rpcndr.h \
 ../../include/objidl.h ../../include/unknwn.h ../../include/wtypes.h \
 ../../include/cguid.h ../../include/propidl.h ../../include/oaidl.h \
 ../../include/oleauto.h ../../include/oleidl.h \
 ../../include/commdlg.h ../../include/winsvc.h ../../include/mcx.h \
 ../../include/imm.h ../../include/winres.h ./resource.h ./tests.rc
