diff --git a/Makefile b/Makefile index 80db02af..e9c14d4f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +MACHINE= $(shell uname -s) CC=gcc CPPC=g++ CFLAGS=-W -Wall -Wno-unused -O3 -DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DFINAL_VERSION -DBKPT_SUPPORT -DSDL -DSYSCONFDIR="home" -DUSE_OPENGL -DC_CORE @@ -10,6 +11,10 @@ DEL=rm -f OE=.o OUT=vba +ifeq ($(MACHINE),Darwin) + LFLAGS=-lz -lpng -framework OpenGL `sdl-config --libs` +endif + ifeq ($(PLATFORM),win) ASMFLAGS=-w-orphan-labels -f win32 -O1 -Isrc/hq/asm/ LFLAGS=-lz -lpng -lSDL -lwsock32 -lopengl32 diff --git a/src/sdl/SDL.cpp b/src/sdl/SDL.cpp index 19bfdc7e..cde63daf 100644 --- a/src/sdl/SDL.cpp +++ b/src/sdl/SDL.cpp @@ -22,8 +22,13 @@ #include #include #include -#include -#include +#ifdef __APPLE__ + #include + #include +#else + #include + #include +#endif #include "../AutoBuild.h"