mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
23 lines
700 B
Diff
23 lines
700 B
Diff
--- ./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
|