From 2cb28a7dd7426125e4d08e358477f4248cc4a918 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Tue, 18 Mar 2008 22:46:36 -0500 Subject: portability - handle distros that use weird naming for the lua libraries and include paths --- Make.config | 6 ++++++ Makefile | 5 ++--- 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) -- cgit v1.2.3