From 3da87f4548a46b3bfd5b939e33c93ada60e582c1 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 3 Nov 2016 15:44:00 +0000 Subject: [PATCH] [SDL/SDL2] define HAVE_ALLOCA_H on non-Windows systems Prevents errors in libtremor --- sdl/Makefile.sdl1 | 4 ++++ sdl/Makefile.sdl2 | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sdl/Makefile.sdl1 b/sdl/Makefile.sdl1 index 3c3329b..7be4437 100644 --- a/sdl/Makefile.sdl1 +++ b/sdl/Makefile.sdl1 @@ -28,6 +28,10 @@ CFLAGS = `sdl-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -Wn #LDFLAGS = -pg DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING -DUSE_LIBTREMOR -DMAXROMSIZE=33554432 +ifneq ($(OS),Windows_NT) +DEFINES += -DHAVE_ALLOCA_H +endif + SRCDIR = ../core INCLUDES = -I$(SRCDIR) -I$(SRCDIR)/z80 -I$(SRCDIR)/m68k -I$(SRCDIR)/sound -I$(SRCDIR)/input_hw -I$(SRCDIR)/cart_hw -I$(SRCDIR)/cart_hw/svp -I$(SRCDIR)/cd_hw -I$(SRCDIR)/ntsc -I$(SRCDIR)/tremor -I$(SRCDIR)/../sdl -I$(SRCDIR)/../sdl/sdl1 LIBS = `sdl-config --libs` -lz -lm diff --git a/sdl/Makefile.sdl2 b/sdl/Makefile.sdl2 index ebf0a4f..73b2ede 100644 --- a/sdl/Makefile.sdl2 +++ b/sdl/Makefile.sdl2 @@ -28,6 +28,10 @@ CFLAGS = `sdl2-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -W #LDFLAGS = -pg DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING -DUSE_LIBTREMOR -DMAXROMSIZE=33554432 +ifneq ($(OS),Windows_NT) +DEFINES += -DHAVE_ALLOCA_H +endif + SRCDIR = ../core INCLUDES = -I$(SRCDIR) -I$(SRCDIR)/z80 -I$(SRCDIR)/m68k -I$(SRCDIR)/sound -I$(SRCDIR)/input_hw -I$(SRCDIR)/cart_hw -I$(SRCDIR)/cart_hw/svp -I$(SRCDIR)/cd_hw -I$(SRCDIR)/ntsc -I$(SRCDIR)/tremor -I$(SRCDIR)/../sdl -I$(SRCDIR)/../sdl/sdl2 LIBS = `sdl2-config --libs` -lz -lm