shithub: choc

Download patch

ref: 2c6e7b2f10c32ca0406ca6753e7701d83e6dea8f
parent: 944a39e9d17b9cd88985553cfb304df6e99a7720
author: Simon Howard <[email protected]>
date: Fri Nov 20 22:56:59 EST 2009

Add Makefile to build Win32 packages.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1736

--- a/configure.in
+++ b/configure.in
@@ -74,6 +74,7 @@
 ])
 
 AC_CHECK_TOOL(WINDRES, windres, )
+AC_CHECK_TOOL(STRIP, strip, )
 
 # Windows CE build?
 
@@ -123,6 +124,7 @@
 pcsound/Makefile
 pkg/Makefile
 pkg/wince/GNUmakefile
+pkg/win32/GNUmakefile
 src/resource.rc
 src/doom-screensaver.desktop
 setup/setup-res.rc
--- a/pkg/Makefile.am
+++ b/pkg/Makefile.am
@@ -1,3 +1,3 @@
 
-DIST_SUBDIRS=wince
+DIST_SUBDIRS=wince win32
 
--- /dev/null
+++ b/pkg/win32/GNUmakefile.am
@@ -1,0 +1,34 @@
+
+TOPLEVEL=../..
+
+EXE_FILES=$(TOPLEVEL)/src/@[email protected]        \
+          $(TOPLEVEL)/src/chocolate-server.exe         \
+          $(TOPLEVEL)/setup/chocolate-setup.exe
+
+DLL_FILES=$(TOPLEVEL)/src/SDL.dll                      \
+          $(TOPLEVEL)/src/SDL_mixer.dll                \
+          $(TOPLEVEL)/src/SDL_net.dll
+
+DOC_FILES=README       \
+          COPYING      \
+          ChangeLog    \
+          NEWS         \
+          BUGS         \
+          CMDLINE      \
+          TODO
+
+noinst_DATA=@PACKAGE_TARNAME@-@[email protected]
+
+@PACKAGE_TARNAME@-@[email protected] : staging
+	zip -j -r $@ staging/
+
+staging: $(EXE_FILES) $(DLL_FILES) $(patsubst %,../../%,$(DOC_FILES))
+	rm -rf staging
+	mkdir staging
+	cp $(EXE_FILES) $(DLL_FILES) staging/
+	$(STRIP) staging/*.exe
+	for f in $(DOC_FILES); do                    \
+		cp $(TOPLEVEL)/$$f staging/$$f.txt;  \
+		unix2dos staging/$$f.txt;            \
+	done
+
--- /dev/null
+++ b/pkg/win32/README
@@ -1,0 +1,4 @@
+
+Makefile to build Windows packages.  Requires zip and unix2dos cygwin
+packages to be installed.
+