From 87fe5c137edcfd147bd8b608e2980de1298de1e2 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Tue, 18 Mar 2008 22:57:56 -0500 Subject: portability - handle distros that have weird names for the lua libraries and include paths --- Make.config | 8 +++++++- Makefile | 8 ++++---- 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 -- cgit v1.2.3