Commit 40cb4668 by jiming

fix library linking error

parent 76233e39
...@@ -4,16 +4,16 @@ version=0.1 ...@@ -4,16 +4,16 @@ version=0.1
name=lua-resty-qrencode name=lua-resty-qrencode
LUA_VERSION = 5.1 LUA_VERSION = 5.1
CC=gcc
# See http://lua-users.org/wiki/BuildingModules for platform specific # See http://lua-users.org/wiki/BuildingModules for platform specific
# details. # details.
## Linux/BSD ## Linux/BSD
PREFIX ?= /usr/local/openresty PREFIX ?= /usr/local/openresty
#LDFLAGS += -shared LDFLAGS += -shared -lpng -lqrencode
## OSX (Macports) ## OSX (Macports)
#PREFIX ?= /opt/local #PREFIX ?= /opt/local
LDFLAGS += -bundle -undefined dynamic_lookup #LDFLAGS += -bundle -undefined dynamic_lookup
## find your luajit path ## find your luajit path
LUA_INCLUDE_DIR ?= $(PREFIX)/luajit/include/luajit-2.1 LUA_INCLUDE_DIR ?= $(PREFIX)/luajit/include/luajit-2.1
...@@ -22,9 +22,9 @@ LUA_LIB_DIR ?= $(PREFIX)/lualib ...@@ -22,9 +22,9 @@ LUA_LIB_DIR ?= $(PREFIX)/lualib
# Some versions of Solaris are missing isinf(). Add -DMISSING_ISINF to # Some versions of Solaris are missing isinf(). Add -DMISSING_ISINF to
# CFLAGS to work around this bug. # CFLAGS to work around this bug.
#CFLAGS ?= -g -Wall -pedantic -fno-inline CFLAGS ?= -g -Wall -pedantic -fno-inline
CFLAGS ?= -g -O3 -Wall -pedantic #CFLAGS ?= -g -O3 -Wall -pedantic
override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR) -lpng -lqrencode override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR)
INSTALL ?= install INSTALL ?= install
...@@ -33,7 +33,7 @@ INSTALL ?= install ...@@ -33,7 +33,7 @@ INSTALL ?= install
all: qrencode.so all: qrencode.so
qrencode.so: qrencode.c qrencode.so: qrencode.c
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
install: install:
$(INSTALL) -d $(LUA_LIB_DIR) $(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