From 3b6a51df240c71374ef331b9594f28ad5c5b5f8e Mon Sep 17 00:00:00 2001 From: Crestwave Date: Tue, 14 May 2019 10:41:33 +0000 Subject: [PATCH 1/2] Add support for Haiku --- Makefile | 3 +++ src/include/janet.h | 1 + 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 03e4aa4d..db7ea30e 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,9 @@ else ifeq ($(UNAME), Linux) CLIBS:=$(CLIBS) -lrt -ldl endif # For other unix likes, add flags here! +ifeq ($(UNAME),Haiku) + LDFLAGS=-Wl,--export-dynamic +endif $(shell mkdir -p build/core build/mainclient build/webclient build/boot) all: $(JANET_TARGET) $(JANET_LIBRARY) diff --git a/src/include/janet.h b/src/include/janet.h index 06eb67f9..02d12bde 100644 --- a/src/include/janet.h +++ b/src/include/janet.h @@ -51,6 +51,7 @@ extern "C" { || defined(__FreeBSD__) || defined(__DragonFly__) \ || defined(__FreeBSD_kernel__) \ || defined(__GNU__) /* GNU/Hurd */ \ + || defined(__HAIKU__) \ || defined(__linux__) \ || defined(__NetBSD__) \ || defined(__OpenBSD__) \ From dc9fc9c3f5daf8194a01dc193b5f3716636a0fd9 Mon Sep 17 00:00:00 2001 From: Crestwave Date: Wed, 15 May 2019 01:23:38 +0000 Subject: [PATCH 2/2] Add 32-bit Haiku build instructions --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 12db7999..3fd501d5 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,18 @@ make test make repl ``` +### 32-bit Haiku + +32-bit Haiku build instructions are the same as the unix-like build instructions, +but you need to specify an alternative compiler, such as `gcc-x86`. + +``` +cd somewhere/my/projects/janet +make CC=gcc-x86 +make test +make repl +``` + ### FreeBSD FreeBSD build instructions are the same as the unix-like build instuctions,