From 669957afeeb60f02cb844da0afbab302c6bac71c Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 13 Dec 2017 17:06:47 +0100 Subject: [PATCH] Register NetBSD into the build system This is probably not the best way. Also, I have not looked at Lua yet; it may need to be built differently than with -DLUA_USE_LINUX. --- client/Makefile | 12 +++++++++--- liblua/Makefile | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/client/Makefile b/client/Makefile index ec59355..6f386cb 100644 --- a/client/Makefile +++ b/client/Makefile @@ -31,9 +31,15 @@ else ifeq ($(platform),Darwin) LUAPLATFORM = macosx else - LUALIB += -ldl - LDLIBS += -ltermcap -lncurses - LUAPLATFORM = linux + ifeq ($(platform),NetBSD) + LDLIBS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib + LDLIBS += -ltermcap -lncurses + LUAPLATFORM = netbsd + else + LUALIB += -ldl + LDLIBS += -ltermcap -lncurses + LUAPLATFORM = linux + endif endif endif diff --git a/liblua/Makefile b/liblua/Makefile index 5525606..346afae 100644 --- a/liblua/Makefile +++ b/liblua/Makefile @@ -26,7 +26,7 @@ MYOBJS= # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= -PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris +PLATS= aix ansi bsd freebsd generic linux macosx mingw netbsd posix solaris LUA_A= liblua.a CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ @@ -114,6 +114,9 @@ mingw: "SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe $(MAKE) "LUAC_T=luac.exe" luac.exe +netbsd: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLDFLAGS="-L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib" SYSLIBS="-Wl,-E -lreadline -ltermcap -lncurses" + posix: $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX"