From c51f057715587f133abe9bfb32d6d453a7af698b Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 1 Apr 2014 19:43:58 -0700 Subject: Initial work on Windows port --- Makefile | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 61e8a19..a0b995f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,21 @@ + +ifdef WINDOWS + +MEM:=mem_win.o +BLASTEM:=blastem.exe +RUNTIME32:=runtime_win.S + +CC:=wine gcc.exe +CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -DDISABLE_OPENGL -I"C:/MinGW/usr/include/SDL" +LDFLAGS:= -L"C:/MinGW/usr/lib" -lm -lmingw32 -lSDLmain -lSDL -mwindows +CPU:=i686 + +else + +MEM:=mem.o +BLASTEM:=blastem +RUNTIME32:=runtime_32.S + ifdef NOGL LIBS=sdl else @@ -22,17 +40,17 @@ endif ifndef CPU CPU:=$(shell uname -m) endif +endif - -TRANSOBJS=gen.o backend.o mem.o +TRANSOBJS=gen.o backend.o $(MEM) M68KOBJS=68kinst.o m68k_core.o ifeq ($(CPU),x86_64) M68KOBJS+= runtime.o m68k_core_x86.o TRANSOBJS+= gen_x86.o backend_x86.o else ifeq ($(CPU),i686) -M68KOBJS+= runtime_32.o m68k_core_x86.o +M68KOBJS+= $(RUNTIME32) m68k_core_x86.o TRANSOBJS+= gen_x86.o backend_x86.o NOZ80:=1 endif @@ -61,8 +79,8 @@ endif all : dis zdis stateview vgmplay blastem -blastem : $(MAINOBJS) - $(CC) -o blastem $(MAINOBJS) $(LDFLAGS) +$(BLASTEM) : $(MAINOBJS) + $(CC) -o $(BLASTEM) $(MAINOBJS) $(LDFLAGS) dis : dis.o 68kinst.o $(CC) -o dis dis.o 68kinst.o -- cgit v1.2.3 From 4468c6074eccd86951fb02d6126b3f4408f1c53e Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 1 Apr 2014 21:12:00 -0700 Subject: Make Windows port a little less half-assed --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a0b995f..83f50f1 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,12 @@ BLASTEM:=blastem.exe RUNTIME32:=runtime_win.S CC:=wine gcc.exe -CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -DDISABLE_OPENGL -I"C:/MinGW/usr/include/SDL" -LDFLAGS:= -L"C:/MinGW/usr/lib" -lm -lmingw32 -lSDLmain -lSDL -mwindows +CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"C:/MinGW/usr/include/SDL" -DGLEW_STATIC +LDFLAGS:= -L"C:/MinGW/usr/lib" -lm -lmingw32 -lSDLmain -lSDL +ifndef NOGL +LDFLAGS+= -lopengl32 -lglu32 +endif +LDFLAGS+= -mwindows CPU:=i686 else @@ -76,6 +80,11 @@ else MAINOBJS+= $(Z80OBJS) endif +ifdef WINDOWS +ifndef NOGL +MAINOBJS+= glew.o +endif +endif all : dis zdis stateview vgmplay blastem -- cgit v1.2.3 From 632c82bd63a13da242c90a5d93dfe7482a0bebe6 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 28 May 2015 21:09:33 -0700 Subject: Adjusted Makefile to support linking against the static glew library from the standard download --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 83f50f1..b7b0eee 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ endif ifdef WINDOWS ifndef NOGL -MAINOBJS+= glew.o +MAINOBJS+= glew32s.lib endif endif -- cgit v1.2.3 From 93a29403d334c8dd1253221fd4588209a706f500 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 28 May 2015 22:31:21 -0700 Subject: Get windows build compiling again post-merge --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b3e966b..fc6a29a 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ MEM:=mem_win.o BLASTEM:=blastem.exe CC:=wine gcc.exe -CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror= -LDFLAGS:= -L"C:/MinGW/usr/lib" -lm -lmingw32 -lSDLmain -lSDL -mwindows +CFLAGS:=-g -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"C:/MinGW/usr/include/SDL2" -DGLEW_STATIC +LDFLAGS:= -L"C:/MinGW/usr/lib" -lm -lmingw32 -lSDL2main -lSDL2 -lopengl32 -lglu32 -mwindows CPU:=i686 else @@ -63,7 +63,7 @@ ifeq ($(OS),Darwin) LDFLAGS+= -framework OpenGL endif -TRANSOBJS=gen.o backend.o mem.o +TRANSOBJS=gen.o backend.o $(MEM) M68KOBJS=68kinst.o m68k_core.o ifeq ($(CPU),x86_64) M68KOBJS+= m68k_core_x86.o @@ -97,7 +97,7 @@ else MAINOBJS+= $(Z80OBJS) endif -ifdef WINDOWS +ifeq ($(OS),Windows) MAINOBJS+= glew32s.lib endif -- cgit v1.2.3 From 66aedc9c1a87c8811be4dba263dbcd7ec026cc70 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 28 May 2015 23:04:49 -0700 Subject: Fix crash bug in windows build --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fc6a29a..eed9d6d 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ MEM:=mem_win.o BLASTEM:=blastem.exe CC:=wine gcc.exe -CFLAGS:=-g -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"C:/MinGW/usr/include/SDL2" -DGLEW_STATIC +CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"C:/MinGW/usr/include/SDL2" -DGLEW_STATIC LDFLAGS:= -L"C:/MinGW/usr/lib" -lm -lmingw32 -lSDL2main -lSDL2 -lopengl32 -lglu32 -mwindows CPU:=i686 -- cgit v1.2.3