commit eb68bf8d689c17c41313fcc8705aa4be70e7dbd5
parent 3a5b87b7d81137c5ac02779937c7a6043d7450c6
Author: falkTX <falktx@falktx.com>
Date: Sun, 2 Apr 2023 15:14:20 +0200
Expand DGL makefile stuff, set USE_GLES2 by default on wasm
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/Makefile.base.mk b/Makefile.base.mk
@@ -407,18 +407,34 @@ endif
# Set Generic DGL stuff
ifeq ($(HAIKU),true)
+
DGL_SYSTEM_LIBS += -lbe
+
else ifeq ($(MACOS),true)
-DGL_SYSTEM_LIBS += -framework Cocoa -framework CoreVideo
+
+DGL_SYSTEM_LIBS += -framework Cocoa
+DGL_SYSTEM_LIBS += -framework CoreVideo
+
else ifeq ($(WASM),true)
+
+# wasm builds cannot work using regular desktop OpenGL
+ifeq (,$(USE_GLES2)$(USE_GLES3))
+USE_GLES2 = true
+endif
+
else ifeq ($(WINDOWS),true)
-DGL_SYSTEM_LIBS += -lgdi32 -lcomdlg32
-# -lole32
+
+DGL_SYSTEM_LIBS += -lcomdlg32
+DGL_SYSTEM_LIBS += -lgdi32
+# DGL_SYSTEM_LIBS += -lole32
+
else
+
ifeq ($(HAVE_DBUS),true)
DGL_FLAGS += $(shell $(PKG_CONFIG) --cflags dbus-1) -DHAVE_DBUS
DGL_SYSTEM_LIBS += $(shell $(PKG_CONFIG) --libs dbus-1)
endif
+
ifeq ($(HAVE_X11),true)
DGL_FLAGS += $(shell $(PKG_CONFIG) --cflags x11) -DHAVE_X11
DGL_SYSTEM_LIBS += $(shell $(PKG_CONFIG) --libs x11)
@@ -434,7 +450,8 @@ ifeq ($(HAVE_XRANDR),true)
DGL_FLAGS += $(shell $(PKG_CONFIG) --cflags xrandr) -DHAVE_XRANDR
DGL_SYSTEM_LIBS += $(shell $(PKG_CONFIG) --libs xrandr)
endif
-endif
+endif # HAVE_X11
+
endif
# ---------------------------------------------------------------------------------------------------------------------
@@ -449,7 +466,7 @@ CAIRO_LIBS = $(shell $(PKG_CONFIG) --libs cairo)
HAVE_CAIRO_OR_OPENGL = true
-endif
+endif # HAVE_CAIRO
# ---------------------------------------------------------------------------------------------------------------------
# Set OpenGL specific stuff
@@ -481,7 +498,7 @@ endif
HAVE_CAIRO_OR_OPENGL = true
-endif
+endif # HAVE_OPENGL
# ---------------------------------------------------------------------------------------------------------------------
# Set Stub specific stuff