aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Make.config6
-rw-r--r--Makefile5
2 files changed, 8 insertions, 3 deletions
diff --git a/Make.config b/Make.config
index 7c25fac..7833518 100644
--- a/Make.config
+++ b/Make.config
@@ -1,6 +1,12 @@
# Path to your Lua C library directory (LUA_CPATH)
LUA_DIR = /usr/local/lib/lua/5.1
+# Some distros require, for example, lua5.1 here
+LUA_LIBNAME = lua
+
+# Some distros put Lua include files in /usr/include/lua5.1, for example
+LUA_INCLUDEPATH = /usr/include
+
# Set this to the path of your luadoc executable if you want to regenerate the
# documentation and the luadoc script isn't in your PATH
LUADOC = luadoc
diff --git a/Makefile b/Makefile
index 6f51358..ab74b97 100644
--- a/Makefile
+++ b/Makefile
@@ -5,10 +5,9 @@ OBJ = src/signal.o \
src/signames.o \
src/queue.o
CC = gcc
-INCLUDES =
+INCLUDES = -I$(LUA_INCLUDEPATH)
DEFINES =
-LIBS = -llua
-# COMMONFLAGS = -fpic -Werror -Wall -pedantic -O0 -g -pipe
+LIBS = -l$(LUA_LIBNAME)
COMMONFLAGS = -fpic -Werror -Wall -pedantic -O2 -g -pipe
CFLAGS = -c $(INCLUDES) $(DEFINES) $(COMMONFLAGS)
LDFLAGS = -shared $(LIBS) $(COMMONFLAGS)