--- src/VBox/Additions/common/crOpenGL/Makefile.kmk.orig 2020-05-13 19:37:03 UTC +++ src/VBox/Additions/common/crOpenGL/Makefile.kmk @@ -50,9 +50,7 @@ endif if1of ($(KBUILD_TARGET), linux solaris freebsd) #VBoxOGL_DRI = 1 DLLS += VBoxEGL - ifn1of ($(KBUILD_TARGET),linux solaris) # No DRI on Solaris yet - VBoxOGL_FAKEDRI = 1 - endif + #VBoxOGL_FAKEDRI = 1 # Only Solaris right now needs C stubs because I can't figure out how to # generate the GOT based relocation ASM yet. @@ -188,10 +186,12 @@ VBoxOGL_CLEAN.linux += \ $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c VBoxOGL_CLEAN.solaris += \ $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c +VBoxOGL_CLEAN.freebsd += \ + $(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c VBoxOGL_CLEAN.win = \ $(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm \ $(VBOX_PATH_CROGL_GENFILES)/cropengl.def -if1of ($(KBUILD_TARGET), linux solaris) +if1of ($(KBUILD_TARGET), linux solaris freebsd) ifdef VBoxOGL_DRI VBoxOGL_CLEAN += \ $(VBOX_PATH_CROGL_GENFILES)/cr_gl.h \ @@ -204,6 +204,8 @@ if1of ($(KBUILD_TARGET), linux solaris) $(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm VBoxOGL_CLEAN.solaris += \ $(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm + VBoxOGL_CLEAN.freebsd += \ + $(VBOX_PATH_CROGL_GENFILES)/freebsd_glxapi_exports.asm endif endif VBoxOGL_LIBS = \ @@ -244,6 +246,8 @@ if1of ($(KBUILD_TARGET), linux solaris freebsd) else VBoxOGL_SONAME.linux = libGL.so.1 VBoxOGL_LDFLAGS.linux += -Wl,-e,LibMain + VBoxOGL_SONAME.freebsd = libGL.so.1 + VBoxOGL_LDFLAGS.freebsd += -Wl,-e,LibMain endif endif ifdef VBOX_WITH_CRHGSMI @@ -252,7 +256,7 @@ endif ifdef VBOX_WITH_WDDM VBoxOGL_DEFS.win += VBOX_WITH_WDDM endif -if1of ($(KBUILD_TARGET), linux) +if1of ($(KBUILD_TARGET), linux freebsd) VBoxOGL_LDFLAGS += -Wl,-z,nodelete endif ifdef VBOX_WITH_WDDM @@ -418,6 +422,16 @@ $(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm: \ $(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm: $(PATH_SUB_CURRENT)/SunOS_i386_glxapi_exports.py | $$(dir $$@) $(call MSG_GENERATE,python,$@,$<) $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< + else ifeq ($(KBUILD_TARGET),freebsd) +$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports_dri.asm: \ + $(PATH_SUB_CURRENT)/FreeBSD_i386_exports_dri.py \ + $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \ + | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) +$(VBOX_PATH_CROGL_GENFILES)/freebsd_glxapi_exports.asm: $(PATH_SUB_CURRENT)/FreeBSD_i386_glxapi_exports.py | $$(dir $$@) + $(call MSG_GENERATE,python,$@,$<) + $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< else $(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \ @@ -656,6 +670,7 @@ ifndef VBOX_USE_SYSTEM_GL_HEADERS endif VBoxEGL_LIBS = $(VBOX_LIB_OGL) # $(VBOX_LIB_IPRT_GUEST_R3_SHARED) VBoxEGL_SONAME.linux = libEGL.so.1 +VBoxEGL_SONAME.freebsd = libEGL.so.1 include $(FILE_KBUILD_SUB_FOOTER)