Skip to content

Commit 95e66eb

Browse files
committed
Add stubs for Haiku, does not work yet
Signed-off-by: falkTX <[email protected]>
1 parent e08f279 commit 95e66eb

File tree

8 files changed

+515
-60
lines changed

8 files changed

+515
-60
lines changed

Makefile.base.mk

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@ BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
272272
endif
273273

274274
ifeq ($(DEBUG),true)
275-
BASE_FLAGS += -DDEBUG -O0 -g -fsanitize=address
275+
BASE_FLAGS += -DDEBUG -O0 -g
276+
ifneq ($(HAIKU),true)
277+
BASE_FLAGS += -fsanitize=address
278+
endif
276279
LINK_OPTS =
277280
ifeq ($(WASM),true)
278281
LINK_OPTS += -sASSERTIONS=1
@@ -347,9 +350,11 @@ endif
347350
# ---------------------------------------------------------------------------------------------------------------------
348351
# Check for required libraries
349352

350-
HAVE_CAIRO = $(shell $(PKG_CONFIG) --exists cairo && echo true)
353+
ifneq ($(HAIKU),true)
354+
HAVE_CAIRO = $(shell $(PKG_CONFIG) --exists cairo && echo true)
355+
endif
351356

352-
ifeq ($(MACOS_OR_WASM_OR_WINDOWS),true)
357+
ifeq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
353358
HAVE_OPENGL = true
354359
else
355360
HAVE_OPENGL = $(shell $(PKG_CONFIG) --exists gl && echo true)
@@ -454,8 +459,8 @@ ifeq ($(HAVE_OPENGL),true)
454459
DGL_FLAGS += -DHAVE_OPENGL
455460

456461
ifeq ($(HAIKU),true)
457-
OPENGL_FLAGS = $(shell $(PKG_CONFIG) --cflags gl)
458-
OPENGL_LIBS = $(shell $(PKG_CONFIG) --libs gl)
462+
OPENGL_FLAGS =
463+
OPENGL_LIBS = -lGL
459464
else ifeq ($(MACOS),true)
460465
OPENGL_FLAGS = -DGL_SILENCE_DEPRECATION=1 -Wno-deprecated-declarations
461466
OPENGL_LIBS = -framework OpenGL
@@ -481,7 +486,7 @@ endif
481486
# ---------------------------------------------------------------------------------------------------------------------
482487
# Set Stub specific stuff
483488

484-
ifeq ($(MACOS_OR_WASM_OR_WINDOWS),true)
489+
ifeq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
485490
HAVE_STUB = true
486491
else
487492
HAVE_STUB = $(HAVE_X11)
@@ -540,7 +545,7 @@ endif
540545
# ---------------------------------------------------------------------------------------------------------------------
541546
# Backwards-compatible HAVE_DGL
542547

543-
ifeq ($(MACOS_OR_WASM_OR_WINDOWS),true)
548+
ifeq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
544549
HAVE_DGL = true
545550
else ifeq ($(HAVE_OPENGL),true)
546551
HAVE_DGL = $(HAVE_X11)

0 commit comments

Comments
 (0)