Commit 40cb4668 by jiming

fix library linking error

parent 76233e39
......@@ -4,16 +4,16 @@ version=0.1
name=lua-resty-qrencode
LUA_VERSION = 5.1
CC=gcc
# See http://lua-users.org/wiki/BuildingModules for platform specific
# details.
## Linux/BSD
PREFIX ?= /usr/local/openresty
#LDFLAGS += -shared
LDFLAGS += -shared -lpng -lqrencode
## OSX (Macports)
#PREFIX ?= /opt/local
LDFLAGS += -bundle -undefined dynamic_lookup
#LDFLAGS += -bundle -undefined dynamic_lookup
## find your luajit path
LUA_INCLUDE_DIR ?= $(PREFIX)/luajit/include/luajit-2.1
......@@ -22,9 +22,9 @@ LUA_LIB_DIR ?= $(PREFIX)/lualib
# 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) -lpng -lqrencode
CFLAGS ?= -g -Wall -pedantic -fno-inline
#CFLAGS ?= -g -O3 -Wall -pedantic
override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR)
INSTALL ?= install
......@@ -33,7 +33,7 @@ INSTALL ?= install
all: qrencode.so
qrencode.so: qrencode.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
install:
$(INSTALL) -d $(LUA_LIB_DIR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment