VirtualBox

Ignore:
Timestamp:
Mar 30, 2009 1:04:33 PM (16 years ago)
Author:
vboxsync
Message:

common/crOpenGL: C stubs, enabled only on Solaris.

Location:
trunk/src/VBox/Additions/common/crOpenGL
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/Makefile.kmk

    r18175 r18542  
    5151 VBoxOGL_FAKEDRI = 1
    5252 VBOX_PATH_MESA_SOURCE = $(VBOX_PATH_X11_ROOT)/mesa-7.2
    53 endif
     53
     54 # Only Solaris right now needs C stubs because I can't figure out how to
     55 # generate the GOT based relocation ASM yet.
     56 ifeq ($(KBUILD_TARGET),solaris)
     57  ifdef VBoxOGL_FAKEDRI
     58   VBOX_OGL_GLX_USE_CSTUBS = 1
     59  endif
     60 endif
     61endif
     62
    5463
    5564#
     
    8190else ifdef VBoxOGL_FAKEDRI
    8291 VBoxOGL_DEFS          += VBOXOGL_FAKEDRI
     92 VBoxOGL_DEFS.solaris  += VBOX_OGL_GLX_USE_CSTUBS
    8393endif
    8494ifeq ($(KBUILD_TARGET),win)
     
    106116        glx.c \
    107117        xfont.c
     118 ifdef VBOX_OGL_GLX_USE_CSTUBS
     119  VBoxOGL_SOURCES += glx_c_exports.c
     120 endif
    108121
    109122 ifdef VBoxOGL_DRI
     
    121134        $(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm \
    122135        $(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm
    123   VBoxOGL_SOURCES.solaris += \
     136  ifndef VBOX_OGL_GLX_USE_CSTUBS
     137   VBoxOGL_SOURCES.solaris += \
    124138        $(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm \
    125139        $(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm
     140  else
     141   VBoxOGL_SOURCES.solaris += \
     142        $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c 
     143  endif
    126144 else
    127145  VBoxOGL_SOURCES.linux += \
    128146        $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm
    129147  VBoxOGL_SOURCES.solaris += \
    130         $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.asm
     148        $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
    131149 endif
    132150endif
     
    145163        $(VBOX_PATH_CROGL_GENFILES)/linux_exports.asm
    146164VBoxOGL_CLEAN.solaris        += \
    147         $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.asm
     165        $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c
    148166VBoxOGL_CLEAN.win      = \
    149167        $(VBOX_PATH_CROGL_GENFILES)/windows_exports.asm \
     
    203221if !defined(VBoxOGL_DRI) && !defined(VBoxOGL_FAKEDRI)
    204222 ifeq ($(KBUILD_TARGET),solaris)
    205 $(VBOX_PATH_CROGL_GENFILES)/solaris_exports.asm: \
    206                 $(PATH_SUB_CURRENT)/SunOS_i386_exports.py \
     223$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c: \
     224                $(PATH_SUB_CURRENT)/SunOS_exports.py \
    207225                $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
    208226                | $$(dir $$@)
     
    238256$(VBOX_PATH_CROGL_GENFILES)/cr_gl.h: $(PATH_SUB_CURRENT)/cr_gl.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
    239257        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
    240  ifeq ($(KBUILD_TARGET),solaris)
     258 ifndef VBOX_OGL_GLX_USE_CSTUBS
     259  ifeq ($(KBUILD_TARGET),solaris)
    241260$(VBOX_PATH_CROGL_GENFILES)/solaris_exports_dri.asm: \
    242261                $(PATH_SUB_CURRENT)/SunOS_i386_exports_dri.py \
     
    246265$(VBOX_PATH_CROGL_GENFILES)/solaris_glxapi_exports.asm: $(PATH_SUB_CURRENT)/SunOS_i386_glxapi_exports.py | $$(dir $$@)
    247266        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $<
    248  else
     267  else
    249268$(VBOX_PATH_CROGL_GENFILES)/linux_exports_dri.asm: \
    250269                $(PATH_SUB_CURRENT)/Linux_i386_exports_dri.py \
     
    254273$(VBOX_PATH_CROGL_GENFILES)/linux_glxapi_exports.asm: $(PATH_SUB_CURRENT)/Linux_i386_glxapi_exports.py | $$(dir $$@)
    255274        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $<
    256  endif
     275  endif
     276 else
     277  # @todo linux if required
     278  ifeq ($(KBUILD_TARGET),solaris)
     279$(VBOX_PATH_CROGL_GENFILES)/solaris_exports.c: \
     280                $(PATH_SUB_CURRENT)/SunOS_exports.py \
     281                $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
     282                | $$(dir $$@)
     283        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     284  endif
     285 endif # VBOX_OGL_GLX_USE_CSTUBS
    257286endif
    258287endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette