From b575c9c18821704e1fa84f7517bff3cd578340ba Mon Sep 17 00:00:00 2001 From: Alexander van der Meij Date: Tue, 25 Aug 2020 11:16:09 +0200 Subject: [PATCH] allow building on openbsd using clang --- common.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 193e393..5e3d630 100644 --- a/common.mk +++ b/common.mk @@ -23,6 +23,13 @@ ifeq ($(UNAME_S),Darwin) else LIB_SUF=so endif +ifeq ($(UNAME_S),OpenBSD) + OS=openbsd + CXX=clang++ + CFLAGS+=-I/usr/local/include + LDFLAGS+=-L/usr/local/lib +endif + ARCH?=$(shell uname -m) ifneq ($(findstring $(ARCH),x86_64/amd64),) CPU=x86-64 @@ -51,7 +58,7 @@ ifeq ($(ARCH),aarch64) CPU=aarch64 BIT=64 endif -ifeq ($(findstring $(OS),mac/mingw64),) +ifeq ($(findstring $(OS),mac/mingw64/openbsd),) LDFLAGS+=-lrt endif