diff options
author | cos <cos> | 2025-02-15 09:32:39 +0100 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2025-02-25 12:47:59 +0100 |
commit | f5f01c663816235bed38b3056771c6898744f567 (patch) | |
tree | c0281134ff27832d0ad6c8da2ea4b721e592798d /src | |
parent | b8b57ba75020c224ae6c5f068cd3514c9a4d7d91 (diff) | |
download | luasystem-f5f01c663816235bed38b3056771c6898744f567.tar.gz luasystem-f5f01c663816235bed38b3056771c6898744f567.tar.bz2 luasystem-f5f01c663816235bed38b3056771c6898744f567.zip |
Add support for OpenBSD+FreeBSD platforms
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 25 |
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 | |||
17 | ifeq ($(UNAME_S),FreeBSD) | 17 | ifeq ($(UNAME_S),FreeBSD) |
18 | PLAT=freebsd | 18 | PLAT=freebsd |
19 | endif | 19 | endif |
20 | ifeq ($(UNAME_S),OpenBSD) | ||
21 | PLAT=openbsd | ||
22 | endif | ||
20 | ifeq ($(patsubst MINGW%,MINGW,$(UNAME_S)),MINGW) | 23 | ifeq ($(patsubst MINGW%,MINGW,$(UNAME_S)),MINGW) |
21 | PLAT=mingw | 24 | PLAT=mingw |
22 | endif | 25 | endif |
@@ -64,6 +67,13 @@ LUAPREFIX_freebsd?=/usr/local/ | |||
64 | CDIR_freebsd?=lib/lua/$(LUA_VERSION) | 67 | CDIR_freebsd?=lib/lua/$(LUA_VERSION) |
65 | LDIR_freebsd?=share/lua/$(LUA_VERSION) | 68 | LDIR_freebsd?=share/lua/$(LUA_VERSION) |
66 | 69 | ||
70 | # LUAINC_openbsd: | ||
71 | LUAINC_openbsd_base?=/usr/local/include | ||
72 | LUAINC_openbsd?=$(LUAINC_openbsd_base)/lua-$(LUA_VERSION) | ||
73 | LUAPREFIX_openbsd?=/usr/local/ | ||
74 | CDIR_openbsd?=lib/lua/$(LUA_VERSION) | ||
75 | LDIR_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 | ||
176 | SO_openbsd=so | ||
177 | O_openbsd=o | ||
178 | CC_openbsd=clang | ||
179 | DEF_openbsd= | ||
180 | CFLAGS_openbsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ | ||
181 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden | ||
182 | LDFLAGS_openbsd=-O -shared -fpic -o | ||
183 | LD_openbsd=clang | ||
184 | |||
185 | #------ | ||
186 | # Compiler and linker settings | ||
165 | # for MingW | 187 | # for MingW |
166 | SO_mingw=dll | 188 | SO_mingw=dll |
167 | O_mingw=o | 189 | O_mingw=o |
@@ -227,6 +249,9 @@ default: $(PLAT) | |||
227 | freebsd: | 249 | freebsd: |
228 | $(MAKE) all PLAT=freebsd | 250 | $(MAKE) all PLAT=freebsd |
229 | 251 | ||
252 | openbsd: | ||
253 | $(MAKE) all PLAT=openbsd | ||
254 | |||
230 | macosx: | 255 | macosx: |
231 | $(MAKE) all PLAT=macosx | 256 | $(MAKE) all PLAT=macosx |
232 | 257 | ||