From a39a82cc9773c8336eaa48379f2d2fe3615f178c Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Tue, 17 Jun 2014 01:50:29 -0400 Subject: blastem builds and almost works on OS X now --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a20ae8f..0eb57cd 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,17 @@ +ifndef OS +OS:=$(shell uname -s) +endif + ifdef NOGL LIBS=sdl else +ifeq ($(OS),Darwin) +LIBS=sdl glew +else LIBS=sdl glew gl endif +endif + LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) ifdef DEBUG CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type @@ -22,7 +31,9 @@ ifndef CPU CPU:=$(shell uname -m) endif - +ifeq ($(OS),Darwin) +LDFLAGS+= -framework OpenGL +endif TRANSOBJS=gen_x86.o backend.o mem.o M68KOBJS=68kinst.o m68k_to_x86.o -- cgit v1.2.3 From bee8289f02bc805f2a2e16d523d50374ee56b490 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 8 Oct 2014 22:18:34 -0700 Subject: Improve support for disassembling 68010+ binaries --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d9e142e..c707397 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,16 @@ ifdef NOGL CFLAGS+= -DDISABLE_OPENGL endif +ifdef M68030 +CFLAGS+= -DM68030 +endif +ifdef M68020 +CFLAGS+= -DM68020 +endif +ifdef M68010 +CFLAGS+= -DM68010 +endif + TRANSOBJS=gen_x86.o x86_backend.o mem.o M68KOBJS=68kinst.o m68k_to_x86.o runtime.o Z80OBJS=z80inst.o z80_to_x86.o zruntime.o -- cgit v1.2.3 From 7237def9b068c5b184cd38041d7eac5fdf8a9438 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 11 Oct 2014 20:32:17 -0700 Subject: Add support for disassembling VOS program modules --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c707397..84db28f 100644 --- a/Makefile +++ b/Makefile @@ -39,8 +39,8 @@ all : dis zdis stateview vgmplay blastem blastem : blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) $(CC) -ggdb -o blastem blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(Z80OBJS) $(TRANSOBJS) $(AUDIOOBJS) $(LDFLAGS) -dis : dis.o 68kinst.o - $(CC) -o dis dis.o 68kinst.o +dis : dis.o 68kinst.o tern.o vos_program_module.o + $(CC) -o dis dis.o 68kinst.o tern.o vos_program_module.o zdis : zdis.o z80inst.o $(CC) -o zdis zdis.o z80inst.o @@ -78,6 +78,9 @@ gen_fib : gen_fib.o gen_x86.o mem.o offsets : offsets.c z80_to_x86.h m68k_to_x86.h $(CC) -o offsets offsets.c +vos_prog_info : vos_prog_info.o vos_program_module.o + $(CC) -o vos_prog_info vos_prog_info.o vos_program_module.o + %.o : %.S $(CC) -c -o $@ $< -- cgit v1.2.3 From 59894dbded604fba7e0bdbd5c2116b9cfd3b431d Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 14 Dec 2014 18:12:00 -0800 Subject: Produce a listing file when assembling 68K test ROMs --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 84db28f..833c4ae 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,7 @@ vos_prog_info : vos_prog_info.o vos_program_module.o $(CC) $(CFLAGS) -c -o $@ $< %.bin : %.s68 - vasmm68k_mot -Fbin -m68000 -no-opt -spaces -o $@ $< + vasmm68k_mot -Fbin -m68000 -no-opt -spaces -o $@ -L $@.list $< %.bin : %.sz8 vasmz80_mot -Fbin -spaces -o $@ $< -- cgit v1.2.3 From 12c73dc400c1b6b61531df4ff0fd1efe4ef7ae12 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Mon, 22 Dec 2014 20:55:10 -0800 Subject: Z80 core is sort of working again --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 61e8a19..272605d 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ NOZ80:=1 endif endif -Z80OBJS=z80inst.o z80_to_x86.o zruntime.o +Z80OBJS=z80inst.o z80_to_x86.o AUDIOOBJS=ym2612.o psg.o wave.o CONFIGOBJS=config.o tern.o util.o -- cgit v1.2.3 From 172a8961d9ebb577668dcb150c56b3f2c6da0419 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 2 Jan 2015 13:47:34 -0800 Subject: In theory, the Z80 core should work on 32-bit builds now; however, I suspect there is some code that cannot deal with most of the Z80 registers not having a native register so more work will be needed --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c81b86d..f4b1e23 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,6 @@ else ifeq ($(CPU),i686) M68KOBJS+= runtime_32.o m68k_core_x86.o TRANSOBJS+= gen_x86.o backend_x86.o -NOZ80:=1 endif endif -- cgit v1.2.3 From 863ea0b3f8b8879ac3092f391a68dc95d0d04de2 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 20 May 2015 19:05:11 -0700 Subject: Upgrade to SDL 2.0 and drop support for the non-OpenGL render path --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 784ac8f..6ddcd52 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,10 @@ ifndef OS OS:=$(shell uname -s) endif -ifdef NOGL -LIBS=sdl -else ifeq ($(OS),Darwin) -LIBS=sdl glew +LIBS=sdl2 glew else -LIBS=sdl glew gl -endif +LIBS=sdl2 glew gl endif ifdef DEBUG -- cgit v1.2.3 From 73ffeecaebbc313eb5713d779622b6e91cc72675 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 20 May 2015 22:27:51 -0700 Subject: Add some tests for hint timing and fix it properly this time. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6ddcd52..ae61100 100644 --- a/Makefile +++ b/Makefile @@ -106,6 +106,9 @@ stateview : stateview.o vdp.o render_sdl.o $(CONFIGOBJS) gst.o vgmplay : vgmplay.o render_sdl.o $(CONFIGOBJS) $(AUDIOOBJS) $(CC) -o vgmplay vgmplay.o render_sdl.o $(CONFIGOBJS) $(AUDIOOBJS) $(LDFLAGS) + +test : test.o vdp.o + $(CC) -o test test.o vdp.o testgst : testgst.o gst.o $(CC) -o testgst testgst.o gst.o -- cgit v1.2.3 From a68ca32cfe9156b40952894ff09f1991f073486e Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 23 May 2015 20:24:27 -0700 Subject: Eliminate runtime.S/runtime_32.S. --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ae61100..f5ff1d3 100644 --- a/Makefile +++ b/Makefile @@ -45,11 +45,11 @@ endif TRANSOBJS=gen.o backend.o mem.o M68KOBJS=68kinst.o m68k_core.o ifeq ($(CPU),x86_64) -M68KOBJS+= runtime.o m68k_core_x86.o +M68KOBJS+= m68k_core_x86.o TRANSOBJS+= gen_x86.o backend_x86.o else ifeq ($(CPU),i686) -M68KOBJS+= runtime_32.o m68k_core_x86.o +M68KOBJS+= m68k_core_x86.o TRANSOBJS+= gen_x86.o backend_x86.o endif endif @@ -61,10 +61,12 @@ CONFIGOBJS=config.o tern.o util.o MAINOBJS=blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(TRANSOBJS) $(AUDIOOBJS) ifeq ($(CPU),x86_64) -CFLAGS+=-DX86_64 +CFLAGS+=-DX86_64 -m64 +LDFLAGS+=-m64 else ifeq ($(CPU),i686) -CFLAGS+=-DX86_32 +CFLAGS+=-DX86_32 -m32 +LDFLAGS+=-m32 endif endif -- cgit v1.2.3 From a75fc6b803164c251b62a941a4544f71a2e86892 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Mon, 25 May 2015 18:56:22 -0700 Subject: Add a define in both the source and Makefile for enabling logging of z80 instruction address/cycle counts. Fix Z80 in/out instructions to eliminate assumptions about which registers are stored in native regs. Fix read_16 to not corrupt the low byte when the read has to call into a C function. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f5ff1d3..ca09d69 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,10 @@ CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wretu LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS)) endif +ifdef Z80_LOG_ADDRESS +CFLAGS+= -DZ80_LOG_ADDRESS +endif + ifdef PROFILE CFLAGS+= -pg LDFLAGS+= -pg -- 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 From 130254db3165ed9c34a860f6d340521b45194e0e Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Mon, 22 Jun 2015 09:22:05 -0700 Subject: Fix check for DEBUG in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index eed9d6d..8c51ce8 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ else LIBS=sdl2 glew gl endif #Darwin -ifdef DEBUGW +ifdef DEBUG CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS)) else -- cgit v1.2.3 From 41427a5cbad6eae33ec644d38227fc7301d7a8c6 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 27 Jun 2015 12:17:18 -0700 Subject: Cleanup some warnings under clang through a combination of code fixes and supressing specific warnings --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8c51ce8..bbd44f4 100644 --- a/Makefile +++ b/Makefile @@ -25,10 +25,10 @@ LIBS=sdl2 glew gl endif #Darwin ifdef DEBUG -CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration +CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS)) else -CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration +CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS)) endif #DEBUG endif #Windows -- cgit v1.2.3 From 834477c2a7f882752fc6ab272f8e01865db33720 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 28 Jun 2015 17:16:24 -0700 Subject: Add support for making a "portable" build on OSX to Makefile --- Makefile | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bbd44f4..f1890da 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,9 @@ OS:=$(shell uname -s) endif ifeq ($(OS),Windows) -CC:=wine gcc.exe MEM:=mem_win.o BLASTEM:=blastem.exe - CC:=wine gcc.exe 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 @@ -24,12 +22,34 @@ else LIBS=sdl2 glew gl endif #Darwin +CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses +FIXUP:= +ifdef PORTABLE +CFLAGS+= -DGLEW_STATIC -Iglew/include +LDFLAGS:=-lm glew/lib/libGLEW.a + +ifeq ($(OS),Darwin) +CFLAGS+= -IFrameworks/SDL2.framework/Headers +LDFLAGS+= -FFrameworks -framework SDL2 -framework OpenGL +FIXUP:=install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/Frameworks/SDL2.framework/Versions/A/SDL2 ./blastem +endif #Darwin + +else +CFLAGS:=$(shell pkg-config --cflags-only-I $(LIBS)) $(CFLAGS) +LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) + +ifeq ($(OS),Darwin) +LDFLAGS+= -framework OpenGL +endif + +endif #PORTABLE + ifdef DEBUG -CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses -LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS)) +CFLAGS:=-ggdb $(CFLAGS) +LDFLAGS:=-ggdb $(LDFLAGS) else -CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses -LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS)) +CFLAGS:=-O2 -flto $(CFLAGS) +LDFLAGS:=-O2 -flto $(LDFLAGS) endif #DEBUG endif #Windows @@ -59,10 +79,6 @@ ifndef CPU CPU:=$(shell uname -m) endif -ifeq ($(OS),Darwin) -LDFLAGS+= -framework OpenGL -endif - TRANSOBJS=gen.o backend.o $(MEM) M68KOBJS=68kinst.o m68k_core.o ifeq ($(CPU),x86_64) @@ -105,6 +121,7 @@ all : dis zdis stateview vgmplay blastem $(BLASTEM) : $(MAINOBJS) $(CC) -o $(BLASTEM) $(MAINOBJS) $(LDFLAGS) + $(FIXUP) dis : dis.o 68kinst.o tern.o vos_program_module.o $(CC) -o dis dis.o 68kinst.o tern.o vos_program_module.o -- cgit v1.2.3 From 983959f838575b6af3e64be442a63647312fcc61 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 28 Jun 2015 18:44:11 -0700 Subject: Get "portable" builds working on Linux and add a build time check for whether /proc exists --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f1890da..ceba9d3 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,8 @@ else LIBS=sdl2 glew gl endif #Darwin -CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses +HAS_PROC:=$(shell if [ -d /proc ]; then echo -e -DHAS_PROC; fi) +CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses $(HAS_PROC) FIXUP:= ifdef PORTABLE CFLAGS+= -DGLEW_STATIC -Iglew/include @@ -32,6 +33,9 @@ ifeq ($(OS),Darwin) CFLAGS+= -IFrameworks/SDL2.framework/Headers LDFLAGS+= -FFrameworks -framework SDL2 -framework OpenGL FIXUP:=install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/Frameworks/SDL2.framework/Versions/A/SDL2 ./blastem +else +CFLAGS+= -Isdl/include +LDFLAGS+= -Wl,-rpath='$$ORIGIN/lib' -Llib -lSDL2 $(shell pkg-config --libs gl) endif #Darwin else -- cgit v1.2.3 From 8f0979a2c4db824e91ead3290d8088d97b20e189 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 2 Jul 2015 19:19:06 -0700 Subject: Initial work on ROM database --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ceba9d3..3ec9807 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ Z80OBJS=z80inst.o z80_to_x86.o AUDIOOBJS=ym2612.o psg.o wave.o CONFIGOBJS=config.o tern.o util.o -MAINOBJS=blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(TRANSOBJS) $(AUDIOOBJS) +MAINOBJS=blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o romdb.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(TRANSOBJS) $(AUDIOOBJS) ifeq ($(CPU),x86_64) CFLAGS+=-DX86_64 -m64 -- cgit v1.2.3 From e7b2812fbdb135338db7a5bade0db8a16dc772b2 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 21 Jul 2015 00:52:21 -0700 Subject: Fix stateview build and fix Makefile to use /bin/echo since builtin echo does not always support -e --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3ec9807..40ffb72 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ else LIBS=sdl2 glew gl endif #Darwin -HAS_PROC:=$(shell if [ -d /proc ]; then echo -e -DHAS_PROC; fi) +HAS_PROC:=$(shell if [ -d /proc ]; then /bin/echo -e -DHAS_PROC; fi) CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses $(HAS_PROC) FIXUP:= ifdef PORTABLE -- cgit v1.2.3 From bee8b42029900ca034675c54d98813a61ca4407a Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 26 Jul 2015 01:11:04 -0700 Subject: Spawn a terminal for the debugger when needed if we are not already attached to one --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 40ffb72..b5b1be9 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ endif ifeq ($(OS),Windows) MEM:=mem_win.o +TERMINAL:=terminal_win.o BLASTEM:=blastem.exe CC:=wine gcc.exe CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"C:/MinGW/usr/include/SDL2" -DGLEW_STATIC @@ -14,6 +15,7 @@ CPU:=i686 else MEM:=mem.o +TERMINAL:=terminal.o BLASTEM:=blastem ifeq ($(OS),Darwin) @@ -99,7 +101,7 @@ Z80OBJS=z80inst.o z80_to_x86.o AUDIOOBJS=ym2612.o psg.o wave.o CONFIGOBJS=config.o tern.o util.o -MAINOBJS=blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o romdb.o $(CONFIGOBJS) gst.o $(M68KOBJS) $(TRANSOBJS) $(AUDIOOBJS) +MAINOBJS=blastem.o debug.o gdb_remote.o vdp.o render_sdl.o io.o romdb.o $(TERMINAL) $(CONFIGOBJS) gst.o $(M68KOBJS) $(TRANSOBJS) $(AUDIOOBJS) ifeq ($(CPU),x86_64) CFLAGS+=-DX86_64 -m64 @@ -119,9 +121,12 @@ endif ifeq ($(OS),Windows) MAINOBJS+= glew32s.lib +ALL=$(BLASTEM) +else +ALL= dis zdis stateview vgmplay blastem termhelper endif -all : dis zdis stateview vgmplay blastem +all : $(ALL) $(BLASTEM) : $(MAINOBJS) $(CC) -o $(BLASTEM) $(MAINOBJS) $(LDFLAGS) @@ -188,4 +193,4 @@ vos_prog_info : vos_prog_info.o vos_program_module.o vasmz80_mot -Fbin -spaces -o $@ $< clean : - rm -rf dis trans stateview test_x86 gen_fib *.o + rm -rf $(ALL) trans ztestrun ztestgen *.o -- cgit v1.2.3 From eb2f5614ca10aed240f2d7b310c6929874effc3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=3D=3FUTF-8=3Fq=3FHigor=3D20Eur=3DC3=3DADpedes=3F=3D?= Date: Sun, 26 Jul 2015 10:59:41 -0700 Subject: Fix mingw-w64 build and cross-compilation --- Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 40ffb72..5b4fd5e 100644 --- a/Makefile +++ b/Makefile @@ -3,12 +3,18 @@ OS:=$(shell uname -s) endif ifeq ($(OS),Windows) +ifndef SDL2_PREFIX +SDL2_PREFIX:="C:/MinGW/usr" +endif +ifndef GLEW32S_LIB +GLEW32S_LIB=glew32s.lib +endif MEM:=mem_win.o BLASTEM:=blastem.exe CC:=wine gcc.exe -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 +CFLAGS:=-O2 -std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"$(SDL2_PREFIX)/include/SDL2" -DGLEW_STATIC +LDFLAGS:= $(GLEW32S_LIB) -L"$(SDL2_PREFIX)/lib" -lm -lmingw32 -lSDL2main -lSDL2 -lopengl32 -lglu32 -mwindows CPU:=i686 else @@ -117,11 +123,7 @@ else MAINOBJS+= $(Z80OBJS) endif -ifeq ($(OS),Windows) -MAINOBJS+= glew32s.lib -endif - -all : dis zdis stateview vgmplay blastem +all : dis zdis stateview vgmplay $(BLASTEM) $(BLASTEM) : $(MAINOBJS) $(CC) -o $(BLASTEM) $(MAINOBJS) $(LDFLAGS) -- cgit v1.2.3