From 3fc6ec8458cc9489822debf2f095b915cc9dcf4c Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 17 Sep 2014 08:58:50 +0000 Subject: main/lua-struct: move from testing --- main/lua-struct/makefile.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 main/lua-struct/makefile.patch (limited to 'main/lua-struct/makefile.patch') diff --git a/main/lua-struct/makefile.patch b/main/lua-struct/makefile.patch new file mode 100644 index 0000000000..9d3867fe1c --- /dev/null +++ b/main/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 -- cgit v1.2.3