From ea1ae62272d361f3afd714c90b0c5df09b6176b8 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Tue, 18 Mar 2008 18:42:11 -0500 Subject: make this build on OS X by switching some flags around --- Make.config | 3 +++ Make.linux | 1 + Make.osx | 1 + Makefile | 3 ++- 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 Make.linux create mode 100644 Make.osx diff --git a/Make.config b/Make.config index a4320d3..51855da 100644 --- a/Make.config +++ b/Make.config @@ -1,2 +1,5 @@ # Path to your Lua C library directory (LUA_CPATH) LUA_C_DIR = /usr/local/lib/lua/5.1 + +OS = linux +#OS = osx diff --git a/Make.linux b/Make.linux new file mode 100644 index 0000000..42d5508 --- /dev/null +++ b/Make.linux @@ -0,0 +1 @@ +OS_FLAGS = -fpic diff --git a/Make.osx b/Make.osx new file mode 100644 index 0000000..c369634 --- /dev/null +++ b/Make.osx @@ -0,0 +1 @@ +OS_FLAGS = -fPIC -bundle diff --git a/Makefile b/Makefile index 0a46896..1f4b78d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ include Make.config +include Make.$(OS) BIN = src/curses.so OBJ = src/curses.o src/strings.o @@ -6,7 +7,7 @@ CC = gcc INCLUDES = DEFINES = LIBS = -lcurses -llua -COMMONFLAGS = -Werror -Wall -pedantic -O0 -g -pipe -fpic +COMMONFLAGS = -Werror -Wall -pedantic -O0 -g -pipe $(OS_FLAGS) CFLAGS = -c $(INCLUDES) $(DEFINES) $(COMMONFLAGS) LDFLAGS = $(LIBS) $(COMMONFLAGS) -shared -- cgit v1.2.3