From 51e39cfd94e6cdc8c594daa80e6f7a8ce20aceca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Thu, 3 Feb 2022 18:51:14 +0100 Subject: [PATCH] Add support for FreeBSD Tested on FreeBSD 13 with boringssl 123eaaef26abc278f53ae338e9c758eb01c70b08 --- build.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.c b/build.c index 87542c9..e73e311 100644 --- a/build.c +++ b/build.c @@ -16,6 +16,10 @@ #define OS "darwin" #define IS_MACOS #endif +#ifdef __FreeBSD__ +#define OS "freebsd" +#define IS_FREEBSD +#endif const char *ARM64 = "arm64"; const char *X64 = "x64"; @@ -59,6 +63,9 @@ void prepare() { /* Build boringssl */ void build_boringssl(const char *arch) { +#ifdef IS_FREEBSD + run("cd uWebSockets/uSockets/boringssl && mkdir -p %s && cd %s && cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release .. && gmake crypto ssl", arch, arch); +#endif #ifdef IS_MACOS /* Build for x64 (the host) */ run("cd uWebSockets/uSockets/boringssl && mkdir -p x64 && cd x64 && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 .. && make crypto ssl");