Index: Makefile
===================================================================
--- Makefile	(revision 2a75e8723ebce7476d77ab4119ace79bc3a69472)
+++ Makefile	(revision 4f3fe484e6e0b39b41d3eef2d9da1c103d7ccc47)
@@ -1,5 +1,12 @@
 OS :=			$(shell uname)
 
+ifndef WIN
+GCC :=			gcc
 SDL2 :=			/opt/sdl2
+else
+GCC :=			x86_64-w64-mingw32-gcc
+SDL2 :=			/opt/sdl2-win
+endif
+
 SDL2_INC :=		$(SDL2)/include
 SDL2_LIB :=		$(SDL2)/lib
@@ -16,4 +23,5 @@
 				-I cpu -I emu -I build -I $(SDL2_INC)
 
+ifndef WIN
 ifeq ($(OS), Linux)
 FLAGS_EMU +=	-D EMU_LINUX
@@ -42,4 +50,19 @@
 				-l iconv
 endif
+else
+FLAGS_EMU +=	-D EMU_WIN
+FLAGS_LNK :=	$(FLAGS) -Wall -Wextra
+LIBS :=			-l mingw32 \
+				$(SDL2_LIB)/libSDL2.a \
+				$(SDL2_LIB)/libSDL2main.a \
+				$(SDL2_LIB)/libSDL2_ttf.a \
+				$(SDL2_LIB)/libfreetype.a \
+				-l gdi32 \
+				-l imm32 \
+				-l ole32 \
+				-l oleaut32 \
+				-l version \
+				-l winmm
+endif
 
 HEADERS :=		$(wildcard cpu/*.h) $(wildcard emu/*.h)
@@ -67,5 +90,5 @@
 
 build/%.o:		build/%.c $(HEADERS)
-				gcc $(FLAGS_CPU) -c -o $@ $<
+				$(GCC) $(FLAGS_CPU) -c -o $@ $<
 
 CPU_C :=		m68kcpu.c m68kdasm.c
@@ -74,5 +97,5 @@
 
 build/%.o:		cpu/%.c $(HEADERS) $(GEN_HP) | build
-				gcc $(FLAGS_CPU) -c -o $@ $<
+				$(GCC) $(FLAGS_CPU) -c -o $@ $<
 
 EMU_C :=		main.c cpu.c vid.c fpu.c tim.c lcd.c ser.c mid.c fdd.c snd.c \
@@ -82,8 +105,8 @@
 
 build/%.o:		emu/%.c $(HEADERS) | build
-				gcc $(FLAGS_EMU) -c -o $@ $<
+				$(GCC) $(FLAGS_EMU) -c -o $@ $<
 
 buchla:			$(CPU_OP) $(GEN_OP)	$(EMU_OP)
-				gcc $(FLAGS_LNK) -o buchla \
+				$(GCC) $(FLAGS_LNK) -o buchla \
 				$(CPU_OP) $(GEN_OP) $(EMU_OP) \
 				$(LIBS)
Index: readme.txt
===================================================================
--- readme.txt	(revision 2a75e8723ebce7476d77ab4119ace79bc3a69472)
+++ readme.txt	(revision 4f3fe484e6e0b39b41d3eef2d9da1c103d7ccc47)
@@ -32,10 +32,10 @@
   https://www.freetype.org/
 
-Currently, the emulator supports Linux and OS X. A port to Windows
-should be pretty easy, given that it doesn't use any platform-specific
-features, just C99 and SDL2.
+Currently, we build the emulator code natively on Linux and OS X. The
+Windows version is cross-compiled on Linux using a x86_64-w64-mingw32
+toolchain.
 
-Our Makefile expects all of the above libraries to reside in
-/opt/sdl2. This is how we typically install them:
+For Linux and OS X, our Makefile expects all of the above libraries to
+reside in /opt/sdl2. This is how we typically install them:
 
   # Build and install FreeType first
@@ -85,4 +85,20 @@
 
 from the top-level directory of this repository to build the emulator.
+
+The cross-build for Windows is done similarly, with the following
+differences when configuring the libraries:
+
+  * We use "--prefix=/opt/sdl2-win" instead of "--prefix=/opt/sdl2",
+    so that the Windows versions of the libraries go to a different
+    directory.
+
+  * We additionally specify "--host=x86_64-w64-mingw32" to enable
+    cross-compilation.
+
+Then, to cross-build the emulator, invoke
+
+  make buchla WIN=1
+
+from the top-level directory of this repository.
 
 
