Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fb1aabab7f
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (32 sloc) 1.138 kb
CJSON_VERSION = 1.0.3
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)
# Some versions of Solaris are missing isinf(). Add -DMISSING_ISINF to
# CFLAGS to work around this bug.
#CFLAGS ?= -g -Wall -pedantic -fno-inline
CFLAGS ?= -g -O3 -Wall -pedantic
override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\"
INSTALL ?= install
.PHONY: all clean install package
all: cjson.so
cjson.so: lua_cjson.o strbuf.o
$(CC) $(LDFLAGS) -o $@ $^
install:
$(INSTALL) -d $(DESTDIR)/$(LUA_LIB_DIR)
$(INSTALL) cjson.so $(DESTDIR)/$(LUA_LIB_DIR)
clean:
rm -f *.o *.so
package:
git archive --prefix="lua-cjson-$(CJSON_VERSION)/" master | \
gzip -9 > "lua-cjson-$(CJSON_VERSION).tar.gz"
git archive --prefix="lua-cjson-$(CJSON_VERSION)/" \
-o "lua-cjson-$(CJSON_VERSION).zip" master
Jump to Line
Something went wrong with that request. Please try again.