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.
This commit is contained in:
Pierre Pronchery 2017-12-13 17:06:47 +01:00
parent 39e3909ae2
commit 669957afee
2 changed files with 13 additions and 4 deletions

View File

@ -30,11 +30,17 @@ ifneq (,$(findstring MINGW,$(platform)))
else
ifeq ($(platform),Darwin)
LUAPLATFORM = macosx
else
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
# Check for correctly configured Qt5

View File

@ -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"