aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcos <cos>2025-02-15 09:32:39 +0100
committerThijs Schreijer <thijs@thijsschreijer.nl>2025-02-25 12:47:59 +0100
commitf5f01c663816235bed38b3056771c6898744f567 (patch)
treec0281134ff27832d0ad6c8da2ea4b721e592798d /src
parentb8b57ba75020c224ae6c5f068cd3514c9a4d7d91 (diff)
downloadluasystem-f5f01c663816235bed38b3056771c6898744f567.tar.gz
luasystem-f5f01c663816235bed38b3056771c6898744f567.tar.bz2
luasystem-f5f01c663816235bed38b3056771c6898744f567.zip
Add support for OpenBSD+FreeBSD platforms
Diffstat (limited to 'src')
-rw-r--r--src/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 6425a4a..7d96cc7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -17,6 +17,9 @@ endif
17ifeq ($(UNAME_S),FreeBSD) 17ifeq ($(UNAME_S),FreeBSD)
18 PLAT=freebsd 18 PLAT=freebsd
19endif 19endif
20ifeq ($(UNAME_S),OpenBSD)
21 PLAT=openbsd
22endif
20ifeq ($(patsubst MINGW%,MINGW,$(UNAME_S)),MINGW) 23ifeq ($(patsubst MINGW%,MINGW,$(UNAME_S)),MINGW)
21 PLAT=mingw 24 PLAT=mingw
22endif 25endif
@@ -64,6 +67,13 @@ LUAPREFIX_freebsd?=/usr/local/
64CDIR_freebsd?=lib/lua/$(LUA_VERSION) 67CDIR_freebsd?=lib/lua/$(LUA_VERSION)
65LDIR_freebsd?=share/lua/$(LUA_VERSION) 68LDIR_freebsd?=share/lua/$(LUA_VERSION)
66 69
70# LUAINC_openbsd:
71LUAINC_openbsd_base?=/usr/local/include
72LUAINC_openbsd?=$(LUAINC_openbsd_base)/lua-$(LUA_VERSION)
73LUAPREFIX_openbsd?=/usr/local/
74CDIR_openbsd?=lib/lua/$(LUA_VERSION)
75LDIR_openbsd?=share/lua/$(LUA_VERSION)
76
67# where lua headers are found for mingw builds 77# where lua headers are found for mingw builds
68# LUAINC_mingw: 78# LUAINC_mingw:
69# /opt/local/include 79# /opt/local/include
@@ -162,6 +172,18 @@ LD_freebsd=gcc
162 172
163#------ 173#------
164# Compiler and linker settings 174# Compiler and linker settings
175# for FreeBSD
176SO_openbsd=so
177O_openbsd=o
178CC_openbsd=clang
179DEF_openbsd=
180CFLAGS_openbsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
181 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
182LDFLAGS_openbsd=-O -shared -fpic -o
183LD_openbsd=clang
184
185#------
186# Compiler and linker settings
165# for MingW 187# for MingW
166SO_mingw=dll 188SO_mingw=dll
167O_mingw=o 189O_mingw=o
@@ -227,6 +249,9 @@ default: $(PLAT)
227freebsd: 249freebsd:
228 $(MAKE) all PLAT=freebsd 250 $(MAKE) all PLAT=freebsd
229 251
252openbsd:
253 $(MAKE) all PLAT=openbsd
254
230macosx: 255macosx:
231 $(MAKE) all PLAT=macosx 256 $(MAKE) all PLAT=macosx
232 257