aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-05-10 18:44:25 +0930
committerMark Pulford <mark@kyne.com.au>2011-05-10 18:44:25 +0930
commitdb59a503b807e3cc741d01de93b6b2e46417e443 (patch)
tree8df18f1cf78afca5ce5e92d2a87f340a20e71a05
parent8f791048ad051456f65026e6e414c7d973731c7e (diff)
downloadlua-cjson-db59a503b807e3cc741d01de93b6b2e46417e443.tar.gz
lua-cjson-db59a503b807e3cc741d01de93b6b2e46417e443.tar.bz2
lua-cjson-db59a503b807e3cc741d01de93b6b2e46417e443.zip
Add build support for Mac OSX
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 14d5a06..8832fed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,24 @@
1CJSON_VERSION = 1.0 1CJSON_VERSION = 1.0
2LUA_VERSION = 5.1 2LUA_VERSION = 5.1
3 3
4# See http://lua-users.org/wiki/BuildingModules for platform specific
5# details.
6
7## Linux/BSD
4PREFIX ?= /usr/local 8PREFIX ?= /usr/local
9LDFLAGS += -shared
10
11## OSX (Macports)
12#PREFIX ?= /opt/local
13#LDFLAGS += -bundle -undefined dynamic_lookup
14
5LUA_INCLUDE_DIR ?= $(PREFIX)/include 15LUA_INCLUDE_DIR ?= $(PREFIX)/include
6LUA_LIB_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION) 16LUA_LIB_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
7 17
8#CFLAGS ?= -g -Wall -pedantic -fno-inline 18#CFLAGS ?= -g -Wall -pedantic -fno-inline
9CFLAGS ?= -g -O2 -Wall -pedantic 19CFLAGS ?= -g -O2 -Wall -pedantic
10override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\" 20override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\"
11LDFLAGS += -shared -lm 21LDFLAGS += -lm
12 22
13INSTALL ?= install 23INSTALL ?= install
14 24