aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-struct/makefile.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-16 09:54:37 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-16 09:54:37 +0000
commit41784e775538bdbe05e0c6a3a493095b152d0bcf (patch)
tree44f1812f93a9bb3fa1092e7a6ef9d01b4c1b9b51 /testing/lua-struct/makefile.patch
parent0bcf492478624fc2fe36fc66289029a5ce53674f (diff)
testing/lua-struct: new aport
Library for Converting Data to and from C Structs for Lua http://www.inf.puc-rio.br/~roberto/struct/
Diffstat (limited to 'testing/lua-struct/makefile.patch')
-rw-r--r--testing/lua-struct/makefile.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/lua-struct/makefile.patch b/testing/lua-struct/makefile.patch
new file mode 100644
index 00000000000..9d3867fe1c7
--- /dev/null
+++ b/testing/lua-struct/makefile.patch
@@ -0,0 +1,22 @@
+--- ./makefile.orig
++++ ./makefile
+@@ -1,6 +1,5 @@
+-# point it to where the compiler can find the Lua header files (lua.h, etc.)
+-# LUADIR = ../lua
+-LUADIR = /usr/include/lua5.1/
++LUAPC?=lua5.1
++LUA_CFLAGS = $(shell pkg-config --cflags $(LUAPC))
+
+ # define your own "large" integer type; not defining a proper type
+ # will default to 'long', which may cause problems with 'size_t'
+@@ -16,8 +15,8 @@
+ -Wshadow \
+ -Wwrite-strings
+
+-CFLAGS = -D_POSIX_SOURCE $(CWARNS) $(INTTYPE) -O2 -I$(LUADIR)
+-CC = gcc
++OPT_CFLAGS ?= -O2
++CFLAGS = -D_POSIX_SOURCE $(CWARNS) $(INTTYPE) $(OPT_CFLAGS) $(LUA_CFLAGS)
+
+ struct.so: struct.c makefile
+ $(CC) $(CFLAGS) -shared -fpic -o struct.so struct.c