diff Makefile @ 682:7ed1dbb48f61

Merge
author Michael Pavone <pavone@retrodev.com>
date Sun, 04 Jan 2015 23:35:55 -0800
parents b68039895627 6b248602ab84
children 019d27995e32
line wrap: on
line diff
--- a/Makefile	Sun Jan 04 23:21:56 2015 -0800
+++ b/Makefile	Sun Jan 04 23:35:55 2015 -0800
@@ -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
+
 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))
@@ -33,7 +42,9 @@
 CPU:=$(shell uname -m)
 endif
 
-
+ifeq ($(OS),Darwin)
+LDFLAGS+= -framework OpenGL
+endif
 
 TRANSOBJS=gen.o backend.o mem.o
 M68KOBJS=68kinst.o m68k_core.o