aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-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