From db59a503b807e3cc741d01de93b6b2e46417e443 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Tue, 10 May 2011 18:44:25 +0930 Subject: Add build support for Mac OSX --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 14d5a06..8832fed 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,24 @@ CJSON_VERSION = 1.0 LUA_VERSION = 5.1 +# See http://lua-users.org/wiki/BuildingModules for platform specific +# details. + +## Linux/BSD PREFIX ?= /usr/local +LDFLAGS += -shared + +## OSX (Macports) +#PREFIX ?= /opt/local +#LDFLAGS += -bundle -undefined dynamic_lookup + LUA_INCLUDE_DIR ?= $(PREFIX)/include LUA_LIB_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION) #CFLAGS ?= -g -Wall -pedantic -fno-inline CFLAGS ?= -g -O2 -Wall -pedantic override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\" -LDFLAGS += -shared -lm +LDFLAGS += -lm INSTALL ?= install -- cgit v1.2.3-55-g6feb