--- a/wscript.orig	2016-09-08 01:58:21.517747400 +0900
+++ b/wscript	2016-09-08 01:58:24.603153700 +0900
@@ -21,6 +21,7 @@
 	conf.load('gnu_dirs')
 	conf.load('compiler_c')
 	conf.env.append_unique('CFLAGS', ['-std=gnu99', '-Wall', '-Wextra', '-D_XOPEN_SOURCE'])
+	conf.env.cshlib_PATTERN = 'msys-%s.dll'
 	if conf.options.debug:
 		conf.env.append_unique('CFLAGS', ['-g', '-Og'])
 	else:
--- a/src/wscript.orig	2016-09-08 01:59:52.025907200 +0900
+++ b/src/wscript	2016-09-08 01:59:56.521546000 +0900
@@ -3,6 +3,7 @@
 	bld.shlib(
 		source = sources,
 		target = 'termbox',
+		libdir = '${PREFIX}/lib',
 		name = 'termbox_shared',
 		vnum = bld.env.VERSION,
 	)
@@ -10,7 +11,7 @@
 		source = sources,
 		target = 'termbox',
 		name = 'termbox_static',
-		install_path = '${LIBDIR}',
+		install_path = '${PREFIX}/lib',
 	)
 	bld.install_files('${PREFIX}/include', 'termbox.h')
 	bld.recurse("demo")
