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