VERSION=@VERSION@

!IFNDEF TOP
TOP=.
!ENDIF
!ifndef LINK
LINK=link
!endif
!ifndef MT
MT=mt
!endif

CLFLAGS=/c /D_MBCS /DNDEBUG /DWIN32 /D_WINDOWS /D_WIN32_WINNT=0x0500 /DWINVER=0x0500 /D_CRT_SECURE_NO_DEPRECATE /Fo$@ /MD /nologo /O2 /w
LNFLAGS=/INCREMENTAL:NO /MACHINE:IX86 /NOLOGO /OUT:$@ /RELEASE /SUBSYSTEM:WINDOWS
RCFLAGS=/c1252 /d_MBCS /dNDEBUG /dWIN32 /d_WINDOWS /d_WIN32_WINNT=0x0500 /dWINVER=0x0500 /fo$@ /l0
DEFINES=/DPACKAGE=\"vmaid\" /DVERSION=\"$(VERSION)\" /DBUILD_ENVIRONMENT=\"Windows\" /DENABLE_NLS=1 /DHAVE_FCNTL_H=1 /DHAVE_SYS_STAT_H=1 /DHAVE_SYS_TYPES_H=1 /DSTDC_HEADERS=1
INCLUDES=/I$(TOP)

all: avicore misc orz src locale\ja\LC_MESSAGES\vmaid.mo vmaid.exe

avicore:
	mkdir $@

misc:
	mkdir $@

orz:
	mkdir $@

src:
	mkdir $@

locale\ja\LC_MESSAGES\vmaid.mo: $(TOP)\po\ja.po
	if not exist locale mkdir locale
	if not exist locale\ja mkdir locale\ja
	if not exist locale\ja\LC_MESSAGES mkdir locale\ja\LC_MESSAGES
	msgfmt $** -o $@

vmaid.exe: avicore\acm.obj avicore\avibase.obj avicore\aviclip.obj avicore\avicore.obj avicore\aviedit.obj avicore\aviextra.obj avicore\avifile.obj avicore\aviframe.obj avicore\avilang.obj avicore\avimemory.obj avicore\aviopen.obj avicore\avipcm.obj avicore\aviplay.obj avicore\avisave.obj avicore\avitext.obj avicore\chunk.obj avicore\icm.obj avicore\wave.obj misc\argument.obj misc\bitmap.obj misc\fileio.obj misc\gnugpl.obj misc\license.obj misc\misc.obj misc\pixbuf.obj misc\profile.obj misc\winmain.obj orz\orzaccel.obj orz\orzcomm.obj orz\orzhistory.obj orz\orzmdi.obj orz\orzpref.obj orz\orzwinmenu.obj src\change.obj src\command.obj src\file.obj src\general.obj src\icons.obj src\jump.obj src\merge.obj src\preview.obj src\prop.obj src\sigfile.obj src\sigmain.obj src\size.obj src\thread.obj src\version.obj src\vmaid.obj src\vmaid.res
	$(LINK) $(LNFLAGS) gdk_pixbuf-2.0.lib gdk-win32-2.0.lib glib-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib intl.lib pango-1.0.lib advapi32.lib gdi32.lib ole32.lib shell32.lib shlwapi.lib user32.lib winmm.lib $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@

avicore\acm.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\wave.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\avibase.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avicore.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\aviclip.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\pixbuf.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\avicore.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\aviedit.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\aviextra.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\avifile.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\avifmt.h $(TOP)\avicore\chunk.h $(TOP)\avicore\gsrfmt.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h $(TOP)\misc\pixbuf.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\aviframe.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\avifmt.h $(TOP)\avicore\chunk.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\avilang.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\avimemory.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\aviopen.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\avifmt.h $(TOP)\avicore\chunk.h $(TOP)\avicore\gsrfmt.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h $(TOP)\misc\pixbuf.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\avipcm.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\aviplay.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\avisave.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\avifmt.h $(TOP)\avicore\chunk.h $(TOP)\avicore\gsrfmt.h $(TOP)\avicore\icm.h $(TOP)\misc\pixbuf.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\avitext.obj: $(TOP)\$*.c $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avibase.h $(TOP)\avicore\avicore.h $(TOP)\avicore\avifmt.h $(TOP)\avicore\chunk.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h $(TOP)\misc\misc.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\chunk.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\icm.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\chunk.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

avicore\wave.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\argument.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\misc.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\bitmap.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\fileio.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\gnugpl.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\license.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\misc.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\misc.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\pixbuf.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\bitmap.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\profile.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\fileio.h $(TOP)\misc\misc.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

misc\winmain.obj: $(TOP)\$*.c $(TOP)\gcommon.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

orz\orzaccel.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

orz\orzcomm.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

orz\orzhistory.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

orz\orzmdi.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\fileio.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

orz\orzpref.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\misc\misc.h $(TOP)\orz\orzhistory.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

orz\orzwinmenu.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\orz\orzmdi.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\change.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\src\file.h $(TOP)\src\size.h $(TOP)\src\thread.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\command.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\aviclip.h $(TOP)\avicore\avicore.h $(TOP)\avicore\aviextra.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h $(TOP)\misc\misc.h $(TOP)\orz\orzhistory.h $(TOP)\orz\orzmdi.h $(TOP)\orz\orzpref.h $(TOP)\src\change.h $(TOP)\src\file.h $(TOP)\src\general.h $(TOP)\src\jump.h $(TOP)\src\merge.h $(TOP)\src\preview.h $(TOP)\src\prop.h $(TOP)\src\sigfile.h $(TOP)\src\size.h $(TOP)\src\thread.h $(TOP)\src\version.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\file.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h $(TOP)\misc\misc.h $(TOP)\orz\orzhistory.h $(TOP)\orz\orzmdi.h $(TOP)\src\sigfile.h $(TOP)\src\sigmain.h $(TOP)\src\size.h $(TOP)\src\thread.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\general.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\orz\orzmdi.h $(TOP)\src\command.h $(TOP)\src\file.h $(TOP)\src\sigfile.h $(TOP)\src\size.h $(TOP)\src\thread.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\icons.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\jump.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\merge.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h $(TOP)\misc\misc.h $(TOP)\orz\orzmdi.h $(TOP)\src\file.h $(TOP)\src\size.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\preview.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\aviplay.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\prop.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\sigfile.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\orz\orzmdi.h $(TOP)\src\command.h $(TOP)\src\file.h $(TOP)\src\general.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\sigmain.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\argument.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\orz\orzhistory.h $(TOP)\orz\orzmdi.h $(TOP)\src\command.h $(TOP)\src\file.h $(TOP)\src\general.h $(TOP)\src\sigfile.h $(TOP)\src\thread.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\size.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\misc.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\thread.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h $(TOP)\misc\misc.h $(TOP)\orz\orzmdi.h $(TOP)\src\general.h $(TOP)\src\icons.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\version.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\acm.h $(TOP)\avicore\avicore.h $(TOP)\avicore\icm.h $(TOP)\avicore\wave.h $(TOP)\misc\bitmap.h $(TOP)\misc\gnugpl.h $(TOP)\misc\misc.h $(TOP)\src\icons.h $(TOP)\src\vmaid.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\vmaid.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\aviclip.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\argument.h $(TOP)\misc\bitmap.h $(TOP)\misc\fileio.h $(TOP)\misc\gnugpl.h $(TOP)\misc\license.h $(TOP)\misc\misc.h $(TOP)\misc\profile.h $(TOP)\orz\orzaccel.h $(TOP)\orz\orzcomm.h $(TOP)\orz\orzhistory.h $(TOP)\orz\orzmdi.h $(TOP)\orz\orzwinmenu.h $(TOP)\src\command.h $(TOP)\src\file.h $(TOP)\src\general.h $(TOP)\src\icons.h $(TOP)\src\sigfile.h $(TOP)\src\sigmain.h $(TOP)\src\thread.h
	$(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c

src\vmaid.res: $(TOP)\$*.rc $(TOP)\$*.ico
	$(RC) $(RCFLAGS) $(TOP)\$*.rc

clean:
	if exist vmaid.exe del /q vmaid.exe
	if exist avicore\acm.obj del /q avicore\acm.obj
	if exist avicore\avibase.obj del /q avicore\avibase.obj
	if exist avicore\aviclip.obj del /q avicore\aviclip.obj
	if exist avicore\avicore.obj del /q avicore\avicore.obj
	if exist avicore\aviedit.obj del /q avicore\aviedit.obj
	if exist avicore\aviextra.obj del /q avicore\aviextra.obj
	if exist avicore\avifile.obj del /q avicore\avifile.obj
	if exist avicore\aviframe.obj del /q avicore\aviframe.obj
	if exist avicore\avilang.obj del /q avicore\avilang.obj
	if exist avicore\avimemory.obj del /q avicore\avimemory.obj
	if exist avicore\aviopen.obj del /q avicore\aviopen.obj
	if exist avicore\avipcm.obj del /q avicore\avipcm.obj
	if exist avicore\aviplay.obj del /q avicore\aviplay.obj
	if exist avicore\avisave.obj del /q avicore\avisave.obj
	if exist avicore\avitext.obj del /q avicore\avitext.obj
	if exist avicore\chunk.obj del /q avicore\chunk.obj
	if exist avicore\icm.obj del /q avicore\icm.obj
	if exist avicore\wave.obj del /q avicore\wave.obj
	if exist misc\argument.obj del /q misc\argument.obj
	if exist misc\bitmap.obj del /q misc\bitmap.obj
	if exist misc\fileio.obj del /q misc\fileio.obj
	if exist misc\gnugpl.obj del /q misc\gnugpl.obj
	if exist misc\license.obj del /q misc\license.obj
	if exist misc\misc.obj del /q misc\misc.obj
	if exist misc\pixbuf.obj del /q misc\pixbuf.obj
	if exist misc\profile.obj del /q misc\profile.obj
	if exist misc\winmain.obj del /q misc\winmain.obj
	if exist orz\orzaccel.obj del /q orz\orzaccel.obj
	if exist orz\orzcomm.obj del /q orz\orzcomm.obj
	if exist orz\orzhistory.obj del /q orz\orzhistory.obj
	if exist orz\orzmdi.obj del /q orz\orzmdi.obj
	if exist orz\orzpref.obj del /q orz\orzpref.obj
	if exist orz\orzwinmenu.obj del /q orz\orzwinmenu.obj
	if exist src\change.obj del /q src\change.obj
	if exist src\command.obj del /q src\command.obj
	if exist src\file.obj del /q src\file.obj
	if exist src\general.obj del /q src\general.obj
	if exist src\icons.obj del /q src\icons.obj
	if exist src\jump.obj del /q src\jump.obj
	if exist src\merge.obj del /q src\merge.obj
	if exist src\preview.obj del /q src\preview.obj
	if exist src\prop.obj del /q src\prop.obj
	if exist src\sigfile.obj del /q src\sigfile.obj
	if exist src\sigmain.obj del /q src\sigmain.obj
	if exist src\size.obj del /q src\size.obj
	if exist src\thread.obj del /q src\thread.obj
	if exist src\version.obj del /q src\version.obj
	if exist src\vmaid.obj del /q src\vmaid.obj
	if exist src\vmaid.res del /q src\vmaid.res
	if exist locale\ja\LC_MESSAGES\vmaid.mo del /q locale\ja\LC_MESSAGES\vmaid.mo
	if exist locale\ja\LC_MESSAGES rmdir /q locale\ja\LC_MESSAGES
	if exist locale\ja rmdir /q locale\ja
	if exist locale rmdir /q locale

dist:
	mkdir vmaid-$(VERSION)-win32
	mkdir vmaid-$(VERSION)-win32\bin
	copy /y vmaid.exe vmaid-$(VERSION)-win32\bin
	mkdir vmaid-$(VERSION)-win32\doc
	mkdir vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	mkdir vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)\en
	mkdir vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)\ja
	copy /y $(TOP)\AUTHORS vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	copy /y $(TOP)\CONTRIBUTORS vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	copy /y $(TOP)\COPYING vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	copy /y $(TOP)\ChangeLog vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	copy /y $(TOP)\INSTALL vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	copy /y $(TOP)\INSTALL.ja vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	copy /y $(TOP)\NEWS vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	copy /y $(TOP)\README vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)
	copy /y $(TOP)\doc\en\*.html vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)\en
	copy /y $(TOP)\doc\ja\*.html vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)\ja
	mkdir vmaid-$(VERSION)-win32\lib
	mkdir vmaid-$(VERSION)-win32\lib\locale
	mkdir vmaid-$(VERSION)-win32\lib\locale\ja
	mkdir vmaid-$(VERSION)-win32\lib\locale\ja\LC_MESSAGES
	copy /y locale\ja\LC_MESSAGES\vmaid.mo vmaid-$(VERSION)-win32\lib\locale\ja\LC_MESSAGES
	zip -9 -r vmaid-$(VERSION)-win32.zip vmaid-$(VERSION)-win32
	rmdir /q /s vmaid-$(VERSION)-win32
