aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Make.config8
-rw-r--r--Makefile8
2 files changed, 11 insertions, 5 deletions
diff --git a/Make.config b/Make.config
index 51855da..1ae1404 100644
--- a/Make.config
+++ b/Make.config
@@ -1,5 +1,11 @@
# Path to your Lua C library directory (LUA_CPATH)
-LUA_C_DIR = /usr/local/lib/lua/5.1
+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
OS = linux
#OS = osx
diff --git a/Makefile b/Makefile
index 1f4b78d..0aee932 100644
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,9 @@ include Make.$(OS)
BIN = src/curses.so
OBJ = src/curses.o src/strings.o
CC = gcc
-INCLUDES =
+INCLUDES = -I$(LUA_INCLUDEPATH)
DEFINES =
-LIBS = -lcurses -llua
+LIBS = -lcurses -l$(LUA_LIBNAME)
COMMONFLAGS = -Werror -Wall -pedantic -O0 -g -pipe $(OS_FLAGS)
CFLAGS = -c $(INCLUDES) $(DEFINES) $(COMMONFLAGS)
LDFLAGS = $(LIBS) $(COMMONFLAGS) -shared
@@ -41,8 +41,8 @@ dep :
rm -f Makefile.bak
install :
- mkdir -p $(LUA_C_DIR)
- cp $(BIN) $(LUA_C_DIR)
+ mkdir -p $(LUA_DIR)
+ cp $(BIN) $(LUA_DIR)
dist : $(VERSION).tar.gz