File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 11CC = gcc
22CFLAGS = -Os -Wall
3- LDFLAGS = -lbz2 -llua
3+ LDFLAGS = -lbz2
44SOFLAGS = -fpic -shared
55
6+ # FIXME: Assumes you have GCC 4.4 installed for building on OS X
67ifeq ($(shell uname) ,Darwin)
78CC = gcc-mp-4.4
8- CPPFLAGS = -I/opt/local/include
9- LDFLAGS += -L/opt/local/lib
109endif
1110
11+ ifeq ($(shell pkg-config --exists lua5.1; echo $$? ) ,0)
12+ PFLAGS = $(shell pkg-config --cflags --libs lua5.1)
13+ else
14+ PFLAGS = $(shell pkg-config --cflags --libs lua)
15+ endif
1216
1317bz2.so : lbz.c
14- $(CC ) $(CFLAGS ) $(SOFLAGS ) $(CPPFLAGS ) $(LDFLAGS ) lbz.c -o bz2.so
18+ $(CC ) $(SOFLAGS ) $(PFLAGS ) $(CFLAGS ) $(LDFLAGS ) lbz.c -o bz2.so
1519
1620clean :
1721 -rm -f bz2.so
Original file line number Diff line number Diff line change @@ -4,5 +4,10 @@ This software is released under a BSD-style license (to be exact, the ISC
44license). The full license can be found in the LICENSE file included with this
55source code.
66
7+ This has been tested with Lua 5.1 on Mac OS X (10.5) and Ubuntu. Getting this
8+ to work on Windows or with an earlier version of Lua is probably just a matter
9+ of massaging the Makefile. If this extension doesn't build for a platform
10+ you're using and you're able to fix the Makefile, please send me your patch.
11+
712More information about Lua: http://www.lua.org/
813More information about bzip2: http://www.bzip.org/
You can’t perform that action at this time.
0 commit comments