VirtualBox

忽略:
時間撮記:
2009-1-26 下午01:06:48 (16 年 以前)
作者:
vboxsync
訊息:

crOpenGL: cleanup guesthost makefile

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/GuestHost/OpenGL/Makefile.kmk

    r15799 r16227  
    2323include $(KBUILD_PATH)/subheader.kmk
    2424
    25 ## @todo r=bird: Move to Config.kmk, before the SDKs or somewhere like that.
    26 ifndef VBOX_BLD_PYTHON
    27  if1of ($(KBUILD_HOST), win)
    28   VBOX_BLD_PYTHON := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/python/v*/python$(HOSTSUFF_EXE))) python-not-found.exe)
    29  else
    30   VBOX_BLD_PYTHON := python$(HOSTSUFF_EXE)
    31  endif
    32 endif
    33 
    34 ## @todo r=bird: Prefix with VBox + makefile qualifier.
    35 GLAPI_PATH := $(PATH_SUB_CURRENT)/glapi_parser
    36 
    37 ## @todo r=bird: messing with the environment like this doesn't work in the non-recursive make setup (which is default now).
    38 # Do it as part of the python invocation (using REDIRECT by all means, no shell stuff please).
    39 # For example:
    40 # VBOX_PYTHON_ENV = $(REDIRECT) $(if $1,-E 'PYTHONPATH=$1',) $(if $2,-o $2,) $(if $3,-i $3) --
    41 # VBOX_CROGL_PYTHONPATH = $(VBOX_CROGL_GLAPI_PATH);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
    42 #
    43 # $(PATH_VBOXCROGL_GENFILES)/errorspu.c: $(PATH_SUB_CURRENT)/error/error.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
    44 #       $(call VBOX_PYTHON_ENV,$(VBOX_CROGL_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH)
    4525if1of ($(KBUILD_HOST), win)
    46  export PYTHONPATH := $(GLAPI_PATH);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
     26VBOX_CROGL_GUEST_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
    4727else
    48  export PYTHONPATH := $(GLAPI_PATH):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
    49 endif
    50 
    51 ## @todo r=bird: Prefix. All single word variables are off limit (VB_CROGL_API_FILES or VBOX_CROGL_API_FILES).
    52 APIFILES := $(GLAPI_PATH)/apiutil.py $(GLAPI_PATH)/APIspec.txt
    53 
    54 ## @todo r=bird: VBOXCROGL_GENFILES is only used once, what's the point?
    55 VBOXCROGL_GENFILES      := VBoxOGLgen
    56 ## @todo r=bird: PATH_VBOXCROGL_GENFILES should be VBOX_PATH_CROGL_GENFILES, see Main/Makefile.kmk and others for examples). [Yes, I know non of this is documented anywhere. No time, and according to some its not a priority...]
    57 PATH_VBOXCROGL_GENFILES := $(PATH_TARGET)/$(VBOXCROGL_GENFILES)
     28VBOX_CROGL_GUEST_HOST_PYTHONPATH := $(VBOX_PATH_CROGL_GLAPI):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
     29endif
    5830
    5931BLDDIRS += \
    60         $(PATH_VBOXCROGL_GENFILES)/ \
    61         $(PATH_VBOXCROGL_GENFILES)/state/
     32        $(VBOX_PATH_CROGL_GENFILES)/ \
     33        $(VBOX_PATH_CROGL_GENFILES)/state/
    6234
    6335ifdef VBOX_WITH_ADDITIONS
     
    7749endif
    7850
    79 ## VBoxOGLGuestHostBase ##
    80 VBoxOGLGuestHostBase_DEFS            = CHROMIUM_THREADSAFE VBOX_WITH_HGCM
    81 VBoxOGLGuestHostBase_DEFS.win        = _WIN32_WINNT=0x0500 WINDOWS=1
    82 VBoxOGLGuestHostBase_DEFS.linux      = Linux=1
    83 VBoxOGLGuestHostBase_DEFS.solaris    = SunOS=1 GLEXT_64_TYPES_DEFINED
    84 VBoxOGLGuestHostBase_DEFS.darwin     = DARWIN=1 GL_GLEXT_LEGACY
    85 # @todo this is not working for some reason
    86 #VBoxOGLGuestHostBase_INCS           := $(PATH_SUB_CURRENT)/include $(PATH_VBOXCROGL_GENFILES)
    87 #VBoxOGLGuestHostBase_INCS.darwin    += $(PATH_OUT)/obj/VBoxOGL
    88 VBoxOGLGuestHostBase_LDFLAGS.darwin += -framework Carbon -framework OpenGL
     51## VBOXOGLR3GUESTHOST ##
     52TEMPLATE_VBOXOGLR3GUESTHOST                = VBox OpenGL GuestHost DLLs/Libraries
     53TEMPLATE_VBOXOGLR3GUESTHOST_EXTENDS        = VBOXR3NP
     54TEMPLATE_VBOXOGLR3GUESTHOST_DEFS           = $(TEMPLATE_VBOXR3NP_DEFS) CHROMIUM_THREADSAFE VBOX_WITH_HGCM
     55TEMPLATE_VBOXOGLR3GUESTHOST_DEFS.win       = $(TEMPLATE_VBOXOGLR3GUESTHOST_DEFS) _WIN32_WINNT=0x0500 WINDOWS=1
     56TEMPLATE_VBOXOGLR3GUESTHOST_DEFS.linux     = $(TEMPLATE_VBOXOGLR3GUESTHOST_DEFS) Linux=1
     57TEMPLATE_VBOXOGLR3GUESTHOST_DEFS.solaris   = $(TEMPLATE_VBOXOGLR3GUESTHOST_DEFS) SunOS=1 GLEXT_64_TYPES_DEFINED
     58TEMPLATE_VBOXOGLR3GUESTHOST_DEFS.darwin    = $(TEMPLATE_VBOXOGLR3GUESTHOST_DEFS) DARWIN=1 GL_GLEXT_LEGACY
     59TEMPLATE_VBOXOGLR3GUESTHOST_INCS           = $(VBOX_PATH_CROGL_INCLUDE) $(VBOX_PATH_CROGL_GENFILES)
     60TEMPLATE_VBOXOGLR3GUESTHOST_INCS.darwin    = $(PATH_OUT)/obj/VBoxOGL
     61TEMPLATE_VBOXOGLR3GUESTHOST_LDFLAGS.linux  = -Wl,--no-as-needed
     62TEMPLATE_VBOXOGLR3GUESTHOST_LDFLAGS.darwin = -framework Carbon -framework OpenGL -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
     63TEMPLATE_VBOXOGLR3GUESTHOST_BLDDIRS        = $(VBOX_PATH_CROGL_GENFILES)/
    8964
    9065#
     
    9267#
    9368
    94 ## @todo r=bird: next target
    95 $(PATH_VBOXCROGL_GENFILES)/debug_opcodes.c: $(PATH_SUB_CURRENT)/util/debug_opcodes.py $(APIFILES)
    96         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    97 
    98 VBoxOGLcrutil_TEMPLATE     = VBOXGUESTR3NPDLL
    99 VBoxOGLcrutil_EXTENDS      = VBoxOGLGuestHostBase
    100 VBoxOGLcrutil_INCS        := $(PATH_SUB_CURRENT)/include $(PATH_VBOXCROGL_GENFILES)
    101 VBoxOGLcrutil_INCS.darwin += $(PATH_OUT)/obj/VBoxOGL
    102 VBoxOGLcrutil_SDKS.win     = DXSDK
    103 VBoxOGLcrutil_INTERMEDIATES = $(PATH_VBOXCROGL_GENFILES)/cr_opcodes.h
    104 VBoxOGLcrutil_SOURCES      = \
     69VBoxOGLcrutil_TEMPLATE      = VBOXOGLR3GUESTHOST
     70VBoxOGLcrutil_SDKS.win      = DXSDK
     71VBoxOGLcrutil_INTERMEDIATES = $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h
     72VBoxOGLcrutil_SOURCES       = \
    10573        bbox.c \
    10674        bufpool.c \
     
    12997        warp.c \
    13098        vboxhgcm.c
    131 VBoxOGLcrutil_SOURCES    := $(addprefix util/, $(VBoxOGLcrutil_SOURCES)) $(PATH_VBOXCROGL_GENFILES)/debug_opcodes.c
     99VBoxOGLcrutil_SOURCES    := $(addprefix util/, $(VBoxOGLcrutil_SOURCES)) $(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c
    132100VBoxOGLcrutil_SOURCES.win.x86 = util/util.def
    133 VBoxOGLcrutil_CLEAN      := $(PATH_VBOXCROGL_GENFILES)/debug_opcodes.c
     101VBoxOGLcrutil_CLEAN      := $(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c
    134102VBoxOGLcrutil_LIBS.win    = \
    135103        $(PATH_SDK_DXSDK_LIB)/ddraw.lib \
     
    140108VBoxOGLhostcrutil_pixel.c_CFLAGS.win.x86 += -Od
    141109
    142 VBoxOGLhostcrutil_TEMPLATE = VBOXR3NP
     110VBoxOGLhostcrutil_TEMPLATE = VBOXOGLR3GUESTHOST
    143111VBoxOGLhostcrutil_EXTENDS = VBoxOGLcrutil
    144112VBoxOGLhostcrutil_LDFLAGS.darwin += $(VBoxOGLcrutil_LDFLAGS.darwin) -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLhostcrutil.dylib -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
     
    150118VBoxOGLhostcrutil_LIBS.win = $(VBoxOGLcrutil_LIBS.win)
    151119
     120$(VBOX_PATH_CROGL_GENFILES)/debug_opcodes.c: $(PATH_SUB_CURRENT)/util/debug_opcodes.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     121        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     122
    152123#
    153124# VBoxOGLcrpacker
    154125#
    155126
    156 ## r=bird: (a) Have to make sure the output directory actually exists, append to pre req list of each:
    157 #               | $$(dir $$@)
    158 # That means the output directory is an order-only dependency.
    159 # (b) VBOX_BLD_PYTHON
    160 # (c) Rules generating stuff for a target goes *after* the target config. [Another convention which hasn't been written down anywhere.]
    161 $(PATH_VBOXCROGL_GENFILES)/packer.def: $(PATH_SUB_CURRENT)/packer/packer_defs.py $(APIFILES)
    162         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    163 
    164 $(PATH_VBOXCROGL_GENFILES)/cr_packfunctions.h: $(PATH_SUB_CURRENT)/packer/pack_header.py $(PATH_SUB_CURRENT)/packer/packer_special $(API_FILES) | $$(dir $$@)
    165         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
    166 
    167 $(PATH_VBOXCROGL_GENFILES)/cr_opcodes.h: $(PATH_SUB_CURRENT)/packer/opcodes.py $(APIFILES)
    168         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    169 
    170 $(PATH_VBOXCROGL_GENFILES)/state/cr_currentpointers.h: $(PATH_SUB_CURRENT)/packer/pack_currentheader.py $(PATH_SUB_CURRENT)/packer/pack_currenttypes.py | $$(dir $(PATH_VBOXCROGL_GENFILES)) $$(dir $$@)
    171         $(VBOX_BLD_PYTHON) $< > $@
    172 
    173 $(PATH_VBOXCROGL_GENFILES)/packer.c: $(PATH_SUB_CURRENT)/packer/packer.py $(PATH_SUB_CURRENT)/packer/packer_special $(APIFILES)
    174         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) $(<D) > $@
    175 
    176 $(PATH_VBOXCROGL_GENFILES)/pack_bbox.c: $(PATH_SUB_CURRENT)/packer/packer_bbox.py
    177         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    178 
    179 $(PATH_VBOXCROGL_GENFILES)/pack_current.c: $(PATH_SUB_CURRENT)/packer/pack_current.py $(PATH_SUB_CURRENT)/packer/pack_currenttypes.py
    180         $(VBOX_BLD_PYTHON) $< > $@
    181 
    182 $(PATH_VBOXCROGL_GENFILES)/%_swap.c: $(PATH_SUB_CURRENT)/packer/%.c $(PATH_SUB_CURRENT)/packer/pack_swap.py
    183         $(VBOX_BLD_PYTHON) $(<D)/pack_swap.py $< > $@
    184 
    185 ## @todo r=bird: GEN_C_FILES and GEN_H_FILES is reused by every target which is very confusing.
    186 # Just push all this down to the SOURCES, INTERMEDIATES and CLEAN. Don't worry about repeating something in the CLEAN list.
    187 GEN_C_FILES := \
    188         pack_bbox.c \
    189         pack_current.c \
    190         packer.c
    191 GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_GENFILES)/, $(GEN_C_FILES))
    192 
    193 GEN_C_FILES.win =
    194 #GEN_C_FILES.win = packer.def
    195 GEN_C_FILES.win := $(addprefix $(PATH_VBOXCROGL_GENFILES)/, $(GEN_C_FILES.win))
    196 
    197 GEN_H_FILES := \
    198         cr_packfunctions.h \
    199         cr_opcodes.h \
    200         state/cr_currentpointers.h
    201 GEN_H_FILES := $(addprefix $(PATH_VBOXCROGL_GENFILES)/, $(GEN_H_FILES))
    202 
    203 ## @todo r=bird: This magic needs a sentence (or five) explaining what the heck it is all about.
    204 # After looking at it, what's the point here really? NORMAL_FILES is only referenced in the +.c bit, and
    205 # NORMAL_C_FILES is only references in the SOURCES. Looks like an extremely convoluted way of avoiding a bit of typing.
    206 NORMAL_FILES := \
    207         pack_arrays \
    208         pack_beginend \
    209         pack_bounds \
    210         pack_buffer \
    211         pack_bufferobject \
    212         pack_client \
    213         pack_clipplane \
    214         pack_context \
    215         pack_error \
    216         pack_extensions \
    217         pack_feedback \
    218         pack_fence \
    219         pack_fog \
    220         pack_init \
    221         pack_lights \
    222         pack_lists \
    223         pack_swap_lists \
    224         pack_map \
    225         pack_point \
    226         pack_swap_map \
    227         pack_misc \
    228         pack_materials \
    229         pack_matrices \
    230         pack_pixels \
    231         pack_pixelmap \
    232         pack_swap_pixelmap \
    233         pack_program \
    234         pack_regcombiner \
    235         pack_stipple \
    236         pack_texture \
    237         pack_swap_texture \
    238         pack_visibleregion
    239 NORMAL_C_FILES := $(addsuffix .c, $(NORMAL_FILES))
    240 NORMAL_C_FILES := $(addprefix packer/, $(NORMAL_C_FILES))
    241 
    242 ## @todo r=bird: ditto.
    243 SWAP_FILES := pack_arrays \
    244         pack_bounds \
    245         pack_bufferobject \
    246         pack_client \
    247         pack_clipplane \
    248         pack_fog \
    249         pack_lights \
    250         pack_materials \
    251         pack_matrices \
    252         pack_misc \
    253         pack_pixels \
    254         pack_point \
    255         pack_program \
    256         pack_regcombiner \
    257         pack_stipple
    258 NAMED_SWAP_FILES := $(addsuffix _swap, $(SWAP_FILES))
    259 SWAP_C_FILES := $(addsuffix .c, $(NAMED_SWAP_FILES))
    260 SWAP_C_FILES := $(addprefix $(PATH_VBOXCROGL_GENFILES)/, $(SWAP_C_FILES))
    261 
    262 VBoxOGLcrpacker_TEMPLATE     = VBOXGUESTR3NPLIB
    263 VBoxOGLcrpacker_EXTENDS      = VBoxOGLGuestHostBase
    264 VBoxOGLcrpacker_INCS        := $(PATH_SUB_CURRENT)/include $(PATH_VBOXCROGL_GENFILES) $(PATH_SUB_CURRENT)/packer
    265 VBoxOGLcrpacker_INCS.darwin += $(PATH_OUT)/obj/VBoxOGL
    266 VBoxOGLcrpacker_SOURCES     := $(NORMAL_C_FILES) $(SWAP_C_FILES) $(GEN_C_FILES)
    267 VBoxOGLcrpacker_SOURCES.win := $(GEN_C_FILES.win)
    268 ## @todo r=bird: No need to have these as DEPS, INTERMEDIATES suffices.
    269 VBoxOGLcrpacker_DEPS        := $(GEN_H_FILES) $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h
    270 VBoxOGLcrpacker_CLEAN       := $(SWAP_C_FILES) $(GEN_C_FILES) $(GEN_H_FILES)
    271 VBoxOGLcrpacker_CLEAN.win   := $(GEN_C_FILES.win)
    272 VBoxOGLcrpacker_INTERMEDIATES = $(GEN_H_FILES)
    273 VBoxOGLcrpacker_LIBS.win     = $(PATH_LIB)/VBoxOGLcrutil$(VBOX_SUFF_LIB)
    274 if1of ($(KBUILD_TARGET), linux solaris darwin)
    275  VBoxOGLcrpacker_LIBS        = $(VBOX_PATH_ADDITIONS)/VBoxOGLcrutil$(VBOX_SUFF_DLL)
    276 endif
    277 
    278 VBoxOGLhostcrpacker_TEMPLATE = VBOXR3NP
     127VBoxOGLcrpacker_TEMPLATE       = VBOXOGLR3GUESTHOST
     128VBoxOGLcrpacker_INCS          := $(PATH_SUB_CURRENT)/packer
     129VBoxOGLcrpacker_SOURCES       := \
     130        packer/pack_arrays.c \
     131        packer/pack_beginend.c \
     132        packer/pack_bounds.c \
     133        packer/pack_buffer.c \
     134        packer/pack_bufferobject.c \
     135        packer/pack_client.c \
     136        packer/pack_clipplane.c \
     137        packer/pack_context.c \
     138        packer/pack_error.c \
     139        packer/pack_extensions.c \
     140        packer/pack_feedback.c \
     141        packer/pack_fence.c \
     142        packer/pack_fog.c \
     143        packer/pack_init.c \
     144        packer/pack_lights.c \
     145        packer/pack_lists.c \
     146        packer/pack_swap_lists.c \
     147        packer/pack_map.c \
     148        packer/pack_point.c \
     149        packer/pack_swap_map.c \
     150        packer/pack_misc.c \
     151        packer/pack_materials.c \
     152        packer/pack_matrices.c \
     153        packer/pack_pixels.c \
     154        packer/pack_pixelmap.c \
     155        packer/pack_swap_pixelmap.c \
     156        packer/pack_program.c \
     157        packer/pack_regcombiner.c \
     158        packer/pack_stipple.c \
     159        packer/pack_texture.c \
     160        packer/pack_swap_texture.c \
     161        packer/pack_visibleregion.c \
     162        $(VBOX_PATH_CROGL_GENFILES)/pack_arrays_swap.c \
     163        $(VBOX_PATH_CROGL_GENFILES)/pack_bounds_swap.c \
     164        $(VBOX_PATH_CROGL_GENFILES)/pack_bufferobject_swap.c \
     165        $(VBOX_PATH_CROGL_GENFILES)/pack_client_swap.c \
     166        $(VBOX_PATH_CROGL_GENFILES)/pack_clipplane_swap.c \
     167        $(VBOX_PATH_CROGL_GENFILES)/pack_fog_swap.c \
     168        $(VBOX_PATH_CROGL_GENFILES)/pack_lights_swap.c \
     169        $(VBOX_PATH_CROGL_GENFILES)/pack_materials_swap.c \
     170        $(VBOX_PATH_CROGL_GENFILES)/pack_matrices_swap.c \
     171        $(VBOX_PATH_CROGL_GENFILES)/pack_misc_swap.c \
     172        $(VBOX_PATH_CROGL_GENFILES)/pack_pixels_swap.c \
     173        $(VBOX_PATH_CROGL_GENFILES)/pack_point_swap.c \
     174        $(VBOX_PATH_CROGL_GENFILES)/pack_program_swap.c \
     175        $(VBOX_PATH_CROGL_GENFILES)/pack_regcombiner_swap.c \
     176        $(VBOX_PATH_CROGL_GENFILES)/pack_stipple_swap.c \
     177        $(VBOX_PATH_CROGL_GENFILES)/pack_bbox.c \
     178        $(VBOX_PATH_CROGL_GENFILES)/pack_current.c \
     179        $(VBOX_PATH_CROGL_GENFILES)/packer.c
     180VBoxOGLcrpacker_INTERMEDIATES := \
     181        $(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h \
     182        $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
     183        $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h \
     184        $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
     185VBoxOGLcrpacker_CLEAN         := \
     186        $(VBOX_PATH_CROGL_GENFILES)/pack_arrays_swap.c \
     187        $(VBOX_PATH_CROGL_GENFILES)/pack_bounds_swap.c \
     188        $(VBOX_PATH_CROGL_GENFILES)/pack_bufferobject_swap.c \
     189        $(VBOX_PATH_CROGL_GENFILES)/pack_client_swap.c \
     190        $(VBOX_PATH_CROGL_GENFILES)/pack_clipplane_swap.c \
     191        $(VBOX_PATH_CROGL_GENFILES)/pack_fog_swap.c \
     192        $(VBOX_PATH_CROGL_GENFILES)/pack_lights_swap.c \
     193        $(VBOX_PATH_CROGL_GENFILES)/pack_materials_swap.c \
     194        $(VBOX_PATH_CROGL_GENFILES)/pack_matrices_swap.c \
     195        $(VBOX_PATH_CROGL_GENFILES)/pack_misc_swap.c \
     196        $(VBOX_PATH_CROGL_GENFILES)/pack_pixels_swap.c \
     197        $(VBOX_PATH_CROGL_GENFILES)/pack_point_swap.c \
     198        $(VBOX_PATH_CROGL_GENFILES)/pack_program_swap.c \
     199        $(VBOX_PATH_CROGL_GENFILES)/pack_regcombiner_swap.c \
     200        $(VBOX_PATH_CROGL_GENFILES)/pack_stipple_swap.c \
     201        $(VBOX_PATH_CROGL_GENFILES)/pack_bbox.c \
     202        $(VBOX_PATH_CROGL_GENFILES)/pack_current.c \
     203        $(VBOX_PATH_CROGL_GENFILES)/packer.c \
     204        $(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h \
     205        $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h \
     206        $(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h
     207VBoxOGLcrpacker_LIBS.win       = $(PATH_LIB)/VBoxOGLcrutil$(VBOX_SUFF_LIB)
     208if1of ($(KBUILD_TARGET), linux solaris darwin)
     209 VBoxOGLcrpacker_LIBS = $(VBOX_PATH_ADDITIONS)/VBoxOGLcrutil$(VBOX_SUFF_DLL)
     210endif
     211
     212VBoxOGLhostcrpacker_TEMPLATE = VBOXOGLR3GUESTHOST
    279213VBoxOGLhostcrpacker_EXTENDS  = VBoxOGLcrpacker
    280214VBoxOGLhostcrpacker_LIBS.win = $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB)
    281 VBoxOGLhostcrpacker_LDFLAGS.linux += -Wl,--no-as-needed
    282215if1of ($(KBUILD_TARGET), linux solaris darwin)
    283216 VBoxOGLhostcrpacker_LIBS    = $(PATH_BIN)/VBoxOGLhostcrutil$(VBOX_SUFF_DLL)
    284217endif
    285218
     219$(VBOX_PATH_CROGL_GENFILES)/packer.def: $(PATH_SUB_CURRENT)/packer/packer_defs.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     220        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     221
     222$(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h: $(PATH_SUB_CURRENT)/packer/pack_header.py $(PATH_SUB_CURRENT)/packer/packer_special $(API_FILES) | $$(dir $$@)
     223        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
     224
     225$(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h: $(PATH_SUB_CURRENT)/packer/opcodes.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     226        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     227
     228$(VBOX_PATH_CROGL_GENFILES)/state/cr_currentpointers.h: $(PATH_SUB_CURRENT)/packer/pack_currentheader.py $(PATH_SUB_CURRENT)/packer/pack_currenttypes.py | $$(dir $(VBOX_PATH_CROGL_GENFILES)) $$(dir $$@)
     229        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $<
     230
     231$(VBOX_PATH_CROGL_GENFILES)/packer.c: $(PATH_SUB_CURRENT)/packer/packer.py $(PATH_SUB_CURRENT)/packer/packer_special $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     232        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI) $(<D)
     233
     234$(VBOX_PATH_CROGL_GENFILES)/pack_bbox.c: $(PATH_SUB_CURRENT)/packer/packer_bbox.py | $$(dir $$@)
     235        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     236
     237$(VBOX_PATH_CROGL_GENFILES)/pack_current.c: $(PATH_SUB_CURRENT)/packer/pack_current.py $(PATH_SUB_CURRENT)/packer/pack_currenttypes.py | $$(dir $$@)
     238        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $<
     239
     240$(VBOX_PATH_CROGL_GENFILES)/%_swap.c: $(PATH_SUB_CURRENT)/packer/%.c $(PATH_SUB_CURRENT)/packer/pack_swap.py | $$(dir $$@)
     241        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/pack_swap.py $<
     242
    286243#
    287244# VBoxOGLspuload
    288245#
    289246
    290 $(PATH_VBOXCROGL_GENFILES)/dispatch.c: $(PATH_SUB_CURRENT)/spu_loader/dispatch.py $(APIFILES)
    291         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    292 
    293 $(PATH_VBOXCROGL_GENFILES)/spucopy.c: $(PATH_SUB_CURRENT)/spu_loader/spucopy.py $(APIFILES)
    294         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    295 
    296 $(PATH_VBOXCROGL_GENFILES)/spuchange.c: $(PATH_SUB_CURRENT)/spu_loader/spuchange.py $(APIFILES)
    297         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    298 
    299 $(PATH_VBOXCROGL_GENFILES)/glloader.c: $(PATH_SUB_CURRENT)/spu_loader/glloader.py $(APIFILES)
    300         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    301 
    302 $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h: $(PATH_SUB_CURRENT)/spu_loader/dispatchheader.py $(APIFILES) | $$(dir $$@)
    303         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    304 
    305 ## @todo r=bird: This ain't working. the GEN_C_FILES reference in VBoxOGLspuload_CLEAN is expanded too late and GEN_C_FILES looks like it's reused. Please clean up the makefile ASAP (see other review comments).
    306 GEN_C_FILES := spuchange.c spucopy.c dispatch.c glloader.c
    307 GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_GENFILES)/, $(GEN_C_FILES))
    308 
    309 VBoxOGLspuload_TEMPLATE   = VBOXGUESTR3NPLIB
    310 VBoxOGLspuload_EXTENDS    = VBoxOGLGuestHostBase
    311 VBoxOGLspuload_INCS      := $(PATH_SUB_CURRENT)/include $(PATH_VBOXCROGL_GENFILES)
    312 VBoxOGLspuload_INCS.darwin += $(PATH_OUT)/obj/VBoxOGL
    313 VBoxOGLspuload_SOURCES   := \
     247VBoxOGLspuload_TEMPLATE   = VBOXOGLR3GUESTHOST
     248VBoxOGLspuload_SOURCES    = \
    314249        spu_loader/spuinit.c \
    315250        spu_loader/spuload.c \
    316251        spu_loader/choosevisual.c \
    317         $(GEN_C_FILES)
    318 #VBoxOGLspuload_SOURCES.win = loader.def
    319 VBoxOGLspuload_DEPS      := $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h
    320 VBoxOGLspuload_CLEAN      = $(GEN_C_FILES) $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h
     252        $(VBOX_PATH_CROGL_GENFILES)/spuchange.c \
     253        $(VBOX_PATH_CROGL_GENFILES)/spucopy.c \
     254        $(VBOX_PATH_CROGL_GENFILES)/dispatch.c \
     255        $(VBOX_PATH_CROGL_GENFILES)/glloader.c
     256VBoxOGLspuload_DEPS      := $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
     257VBoxOGLspuload_CLEAN      = \
     258        $(VBOX_PATH_CROGL_GENFILES)/spuchange.c \
     259        $(VBOX_PATH_CROGL_GENFILES)/spucopy.c \
     260        $(VBOX_PATH_CROGL_GENFILES)/dispatch.c \
     261        $(VBOX_PATH_CROGL_GENFILES)/glloader.c \
     262        $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
    321263VBoxOGLspuload_LIBS.win   = $(PATH_LIB)/VBoxOGLcrutil$(VBOX_SUFF_LIB)
    322264if1of ($(KBUILD_TARGET), linux solaris darwin)
     
    325267endif
    326268
    327 VBoxOGLhostspuload_TEMPLATE = VBOXR3NP
     269VBoxOGLhostspuload_TEMPLATE = VBOXOGLR3GUESTHOST
    328270VBoxOGLhostspuload_EXTENDS  = VBoxOGLspuload
    329271VBoxOGLhostspuload_LIBS.win = $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB)
    330 VBoxOGLhostspuload_LDFLAGS.linux += -Wl,--no-as-needed
    331272if1of ($(KBUILD_TARGET), linux solaris darwin)
    332273 VBoxOGLhostspuload_LIBS += \
     
    334275endif
    335276
     277$(VBOX_PATH_CROGL_GENFILES)/dispatch.c: $(PATH_SUB_CURRENT)/spu_loader/dispatch.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     278        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     279
     280$(VBOX_PATH_CROGL_GENFILES)/spucopy.c: $(PATH_SUB_CURRENT)/spu_loader/spucopy.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     281        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     282
     283$(VBOX_PATH_CROGL_GENFILES)/spuchange.c: $(PATH_SUB_CURRENT)/spu_loader/spuchange.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     284        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     285
     286$(VBOX_PATH_CROGL_GENFILES)/glloader.c: $(PATH_SUB_CURRENT)/spu_loader/glloader.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     287        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     288
     289$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h: $(PATH_SUB_CURRENT)/spu_loader/dispatchheader.py $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     290        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     291
    336292#
    337293#  VBoxOGLcrstate
    338294#
    339295
    340 $(PATH_VBOXCROGL_GENFILES)/state_buffer_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_buffer.txt gendiffcode.py)
    341         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py buffer Buffer $(<D) > $@
    342 
    343 $(PATH_VBOXCROGL_GENFILES)/state_client_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_client.txt gendiffcode.py)
    344         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py client Client $(<D) > $@
    345 
    346 $(PATH_VBOXCROGL_GENFILES)/state_current_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_current.py convert.py) $(APIFILES)
    347         $(VBOX_BLD_PYTHON) $(<D)/state_current.py > $@
    348 
    349 $(PATH_VBOXCROGL_GENFILES)/state_fog_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_fog.txt gendiffcode.py)
    350         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py fog Fog $(<D) > $@
    351 
    352 $(PATH_VBOXCROGL_GENFILES)/state_hint_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_hint.txt gendiffcode.py)
    353         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py hint Hint $(<D) > $@
    354 
    355 $(PATH_VBOXCROGL_GENFILES)/state_lighting_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_lighting.txt gendiffcode.py)
    356         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py lighting Lighting $(<D) > $@
    357 
    358 $(PATH_VBOXCROGL_GENFILES)/state_line_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_line.txt gendiffcode.py)
    359         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py line Line $(<D) > $@
    360 
    361 $(PATH_VBOXCROGL_GENFILES)/state_multisample_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_multisample.txt gendiffcode.py)
    362         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py multisample Multisample $(<D) >$@
    363 
    364 $(PATH_VBOXCROGL_GENFILES)/state_point_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_point.txt gendiffcode.py)
    365         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py point Point $(<D) > $@
    366 
    367 $(PATH_VBOXCROGL_GENFILES)/state_polygon_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_polygon.txt gendiffcode.py)
    368         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py polygon Polygon $(<D) > $@
    369 
    370 $(PATH_VBOXCROGL_GENFILES)/state_regcombiner_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_regcombiner.txt gendiffcode.py)
    371         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py regcombiner RegCombiner $(<D) > $@
    372 
    373 $(PATH_VBOXCROGL_GENFILES)/state_stencil_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_stencil.txt gendiffcode.py)
    374         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py stencil Stencil $(<D) > $@
    375 
    376 $(PATH_VBOXCROGL_GENFILES)/state_viewport_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_viewport.txt gendiffcode.py)
    377         $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py viewport Viewport $(<D) > $@
    378 
    379 $(PATH_VBOXCROGL_GENFILES)/state_get.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_get.py state_get.txt state_extensions_get.txt) $(APIFILES)
    380         $(VBOX_BLD_PYTHON) $(<D)/state_get.py $(GLAPI_PATH) $(<D) > $@
    381 
    382 $(PATH_VBOXCROGL_GENFILES)/state_isenabled.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_isenabled.py state_isenabled.txt state_extensions_isenabled.txt) $(APIFILES)
    383         $(VBOX_BLD_PYTHON) $(<D)/state_isenabled.py $(GLAPI_PATH) $(<D) > $@
    384 
    385 $(PATH_VBOXCROGL_GENFILES)/state.def: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_defs.py state_special state_select_special state_feedback_special) $(APIFILES)
    386         $(VBOX_BLD_PYTHON) $(<D)/state_defs.py $(GLAPI_PATH) $(<D) > $@
    387 
    388 $(PATH_VBOXCROGL_GENFILES)/state/cr_statefuncs.h: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_funcs.py state_special state_feedback_special state_select_special) $(APIFILES) | $$(dir $$@)
    389         $(VBOX_BLD_PYTHON) $(<D)/state_funcs.py $(GLAPI_PATH) $(<D) > $@
    390 
    391 GEN_FILES := buffer \
    392         current \
    393         fog \
    394         hint \
    395         lighting \
    396         line \
    397         multisample \
    398         point \
    399         polygon \
    400         regcombiner \
    401         stencil \
    402         viewport
    403 GEN_FILES   := $(addprefix state_, $(GEN_FILES))
    404 GEN_C_FILES := $(addsuffix _gen.c, $(GEN_FILES))
    405 GEN_C_FILES := state_get.c state_isenabled.c $(GEN_C_FILES)
    406 GEN_C_FILES := $(addprefix $(PATH_VBOXCROGL_GENFILES)/, $(GEN_C_FILES))
    407 
    408 #GEN_C_FILES.win := state.def
    409 GEN_C_FILES.win :=
    410 GEN_C_FILES.win := $(addprefix $(PATH_VBOXCROGL_GENFILES)/, $(GEN_C_FILES.win))
    411 
    412 GEN_H_FILES := state/cr_statefuncs.h
    413 GEN_H_FILES := $(addprefix $(PATH_VBOXCROGL_GENFILES)/, $(GEN_H_FILES))
    414 
    415 VBoxOGLcrstate_TEMPLATE     = VBOXGUESTR3NPLIB
    416 VBoxOGLcrstate_EXTENDS      = VBoxOGLGuestHostBase
    417 VBoxOGLcrstate_INCS        :=   \
    418         $(PATH_SUB_CURRENT)/include \
    419         $(PATH_VBOXCROGL_GENFILES)  \
    420         $(PATH_SUB_CURRENT)/state_tracker
    421 VBoxOGLcrstate_INCS.darwin += $(PATH_OUT)/obj/VBoxOGL
    422 VBoxOGLcrstate_LDFLAGS.darwin += -framework Carbon -framework OpenGL
    423 VBoxOGLcrstate_SOURCES   := \
    424         state_attrib.c \
    425         state_buffer.c \
    426         state_bufferobject.c \
    427         state_client.c \
    428         state_current.c \
    429         state_diff.c \
    430         state_enable.c \
    431         state_error.c \
    432         state_evaluators.c \
    433         state_feedback.c \
    434         state_fence.c \
    435         state_flush.c \
    436         state_fog.c \
    437         state_getstring.c \
    438         state_hint.c \
    439         state_init.c \
    440         state_lighting.c \
    441         state_limits.c \
    442         state_line.c \
    443         state_lists.c \
    444         state_multisample.c \
    445         state_occlude.c \
    446         state_pixel.c \
    447         state_point.c \
    448         state_polygon.c \
    449         state_program.c \
    450         state_rasterpos.c \
    451         state_regcombiner.c \
    452         state_stencil.c \
    453         state_texture.c \
    454         state_teximage.c \
    455         state_texdiff.c \
    456         state_transform.c \
    457         state_viewport.c
    458 VBoxOGLcrstate_SOURCES     := $(addprefix state_tracker/, $(VBoxOGLcrstate_SOURCES)) $(GEN_C_FILES)
    459 VBoxOGLcrstate_SOURCES.win := $(GEN_C_FILES.win)
    460 VBoxOGLcrstate_DEPS        := $(GEN_H_FILES)
    461 VBoxOGLcrstate_CLEAN       := $(GEN_C_FILES) $(GEN_H_FILES)
    462 VBoxOGLcrstate_LIBS.win     = \
     296VBoxOGLcrstate_TEMPLATE       = VBOXOGLR3GUESTHOST
     297VBoxOGLcrstate_INCS          := $(PATH_SUB_CURRENT)/state_tracker
     298VBoxOGLcrstate_SOURCES       := \
     299        state_tracker/state_attrib.c \
     300        state_tracker/state_buffer.c \
     301        state_tracker/state_bufferobject.c \
     302        state_tracker/state_client.c \
     303        state_tracker/state_current.c \
     304        state_tracker/state_diff.c \
     305        state_tracker/state_enable.c \
     306        state_tracker/state_error.c \
     307        state_tracker/state_evaluators.c \
     308        state_tracker/state_feedback.c \
     309        state_tracker/state_fence.c \
     310        state_tracker/state_flush.c \
     311        state_tracker/state_fog.c \
     312        state_tracker/state_getstring.c \
     313        state_tracker/state_hint.c \
     314        state_tracker/state_init.c \
     315        state_tracker/state_lighting.c \
     316        state_tracker/state_limits.c \
     317        state_tracker/state_line.c \
     318        state_tracker/state_lists.c \
     319        state_tracker/state_multisample.c \
     320        state_tracker/state_occlude.c \
     321        state_tracker/state_pixel.c \
     322        state_tracker/state_point.c \
     323        state_tracker/state_polygon.c \
     324        state_tracker/state_program.c \
     325        state_tracker/state_rasterpos.c \
     326        state_tracker/state_regcombiner.c \
     327        state_tracker/state_stencil.c \
     328        state_tracker/state_texture.c \
     329        state_tracker/state_teximage.c \
     330        state_tracker/state_texdiff.c \
     331        state_tracker/state_transform.c \
     332        state_tracker/state_viewport.c \
     333        $(VBOX_PATH_CROGL_GENFILES)/state_buffer_gen.c \
     334        $(VBOX_PATH_CROGL_GENFILES)/state_current_gen.c \
     335        $(VBOX_PATH_CROGL_GENFILES)/state_fog_gen.c \
     336        $(VBOX_PATH_CROGL_GENFILES)/state_hint_gen.c \
     337        $(VBOX_PATH_CROGL_GENFILES)/state_lighting_gen.c \
     338        $(VBOX_PATH_CROGL_GENFILES)/state_line_gen.c \
     339        $(VBOX_PATH_CROGL_GENFILES)/state_multisample_gen.c \
     340        $(VBOX_PATH_CROGL_GENFILES)/state_point_gen.c \
     341        $(VBOX_PATH_CROGL_GENFILES)/state_polygon_gen.c \
     342        $(VBOX_PATH_CROGL_GENFILES)/state_regcombiner_gen.c \
     343        $(VBOX_PATH_CROGL_GENFILES)/state_stencil_gen.c \
     344        $(VBOX_PATH_CROGL_GENFILES)/state_viewport_gen.c \
     345        $(VBOX_PATH_CROGL_GENFILES)/state_get.c \
     346        $(VBOX_PATH_CROGL_GENFILES)/state_isenabled.c
     347VBoxOGLcrstate_INTERMEDIATES := $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
     348VBoxOGLcrstate_CLEAN         := \
     349        $(VBOX_PATH_CROGL_GENFILES)/state_buffer_gen.c \
     350        $(VBOX_PATH_CROGL_GENFILES)/state_current_gen.c \
     351        $(VBOX_PATH_CROGL_GENFILES)/state_fog_gen.c \
     352        $(VBOX_PATH_CROGL_GENFILES)/state_hint_gen.c \
     353        $(VBOX_PATH_CROGL_GENFILES)/state_lighting_gen.c \
     354        $(VBOX_PATH_CROGL_GENFILES)/state_line_gen.c \
     355        $(VBOX_PATH_CROGL_GENFILES)/state_multisample_gen.c \
     356        $(VBOX_PATH_CROGL_GENFILES)/state_point_gen.c \
     357        $(VBOX_PATH_CROGL_GENFILES)/state_polygon_gen.c \
     358        $(VBOX_PATH_CROGL_GENFILES)/state_regcombiner_gen.c \
     359        $(VBOX_PATH_CROGL_GENFILES)/state_stencil_gen.c \
     360        $(VBOX_PATH_CROGL_GENFILES)/state_viewport_gen.c \
     361        $(VBOX_PATH_CROGL_GENFILES)/state_get.c \
     362        $(VBOX_PATH_CROGL_GENFILES)/state_isenabled.c \
     363        $(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h
     364VBoxOGLcrstate_LIBS.win      = \
    463365        $(PATH_LIB)/VBoxOGLcrutil$(VBOX_SUFF_LIB) \
    464366        $(PATH_LIB)/VBoxOGLspuload$(VBOX_SUFF_LIB)
     
    469371endif
    470372
    471 VBoxOGLhostcrstate_TEMPLATE = VBOXR3NP
     373VBoxOGLhostcrstate_TEMPLATE = VBOXOGLR3GUESTHOST
    472374VBoxOGLhostcrstate_EXTENDS  = VBoxOGLcrstate
    473375VBoxOGLhostcrstate_SOURCES  = $(VBoxOGLcrstate_SOURCES) state_tracker/state_snapshot.c
     
    476378        $(PATH_LIB)/VBoxOGLhostspuload$(VBOX_SUFF_LIB) \
    477379        $(LIB_VMM)
    478 VBoxOGLhostcrstate_LDFLAGS.linux += -Wl,--no-as-needed
    479380if1of ($(KBUILD_TARGET), linux solaris darwin)
    480381 VBoxOGLhostcrstate_LIBS += \
     
    484385endif
    485386
     387$(VBOX_PATH_CROGL_GENFILES)/state_buffer_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_buffer.txt gendiffcode.py) | $$(dir $$@)
     388        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py buffer Buffer $(<D)
     389
     390$(VBOX_PATH_CROGL_GENFILES)/state_client_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_client.txt gendiffcode.py) | $$(dir $$@)
     391        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py client Client $(<D)
     392
     393$(VBOX_PATH_CROGL_GENFILES)/state_current_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_current.py convert.py) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     394        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_current.py
     395
     396$(VBOX_PATH_CROGL_GENFILES)/state_fog_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_fog.txt gendiffcode.py) | $$(dir $$@)
     397        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py fog Fog $(<D)
     398
     399$(VBOX_PATH_CROGL_GENFILES)/state_hint_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_hint.txt gendiffcode.py) | $$(dir $$@)
     400        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py hint Hint $(<D)
     401
     402$(VBOX_PATH_CROGL_GENFILES)/state_lighting_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_lighting.txt gendiffcode.py) | $$(dir $$@)
     403        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py lighting Lighting $(<D)
     404
     405$(VBOX_PATH_CROGL_GENFILES)/state_line_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_line.txt gendiffcode.py) | $$(dir $$@)
     406        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py line Line $(<D)
     407
     408$(VBOX_PATH_CROGL_GENFILES)/state_multisample_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_multisample.txt gendiffcode.py) | $$(dir $$@)
     409        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py multisample Multisample $(<D)
     410
     411$(VBOX_PATH_CROGL_GENFILES)/state_point_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_point.txt gendiffcode.py) | $$(dir $$@)
     412        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py point Point $(<D)
     413
     414$(VBOX_PATH_CROGL_GENFILES)/state_polygon_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_polygon.txt gendiffcode.py) | $$(dir $$@)
     415        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py polygon Polygon $(<D)
     416
     417$(VBOX_PATH_CROGL_GENFILES)/state_regcombiner_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_regcombiner.txt gendiffcode.py) | $$(dir $$@)
     418        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py regcombiner RegCombiner $(<D)
     419
     420$(VBOX_PATH_CROGL_GENFILES)/state_stencil_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_stencil.txt gendiffcode.py) | $$(dir $$@)
     421        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py stencil Stencil $(<D)
     422
     423$(VBOX_PATH_CROGL_GENFILES)/state_viewport_gen.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_viewport.txt gendiffcode.py) | $$(dir $$@)
     424        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/gendiffcode.py viewport Viewport $(<D)
     425
     426$(VBOX_PATH_CROGL_GENFILES)/state_get.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_get.py state_get.txt state_extensions_get.txt) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     427        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_get.py $(VBOX_PATH_CROGL_GLAPI) $(<D)
     428
     429$(VBOX_PATH_CROGL_GENFILES)/state_isenabled.c: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_isenabled.py state_isenabled.txt state_extensions_isenabled.txt) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     430        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_isenabled.py $(VBOX_PATH_CROGL_GLAPI) $(<D)
     431
     432$(VBOX_PATH_CROGL_GENFILES)/state.def: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_defs.py state_special state_select_special state_feedback_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     433        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_defs.py $(VBOX_PATH_CROGL_GLAPI) $(<D)
     434
     435$(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h: $(addprefix $(PATH_SUB_CURRENT)/state_tracker/, state_funcs.py state_special state_feedback_special state_select_special) $(VBOX_CROGL_API_FILES) | $$(dir $$@)
     436        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $(<D)/state_funcs.py $(VBOX_PATH_CROGL_GLAPI) $(<D)
     437
    486438#
    487439# VBoxOGLerrorspu
    488440#
    489441
    490 $(PATH_VBOXCROGL_GENFILES)/errorspu.c: $(PATH_SUB_CURRENT)/error/error.py $(APIFILES)
    491         $(VBOX_BLD_PYTHON) $< $(GLAPI_PATH) > $@
    492 
    493 VBoxOGLerrorspu_TEMPLATE   = VBOXGUESTR3NPDLL
    494 VBoxOGLerrorspu_EXTENDS    = VBoxOGLGuestHostBase
    495 VBoxOGLerrorspu_INCS      := $(PATH_SUB_CURRENT)/include $(PATH_VBOXCROGL_GENFILES)
    496 VBoxOGLerrorspu_DEPS.darwin += $(PATH_OUT)/obj/VBoxOGL/GL/gl.h $(PATH_OUT)/obj/VBoxOGL/GL/glu.h
    497 VBoxOGLerrorspu_INCS.darwin += $(PATH_OUT)/obj/VBoxOGL
    498 VBoxOGLerrorspu_INTERMEDIATES = $(PATH_VBOXCROGL_GENFILES)/spu_dispatch_table.h
    499 VBoxOGLerrorspu_SOURCES    = \
    500         $(PATH_VBOXCROGL_GENFILES)/errorspu.c \
     442VBoxOGLerrorspu_TEMPLATE      = VBOXOGLR3GUESTHOST
     443VBoxOGLerrorspu_DEPS.darwin  += $(PATH_OUT)/obj/VBoxOGL/GL/gl.h $(PATH_OUT)/obj/VBoxOGL/GL/glu.h
     444VBoxOGLerrorspu_INTERMEDIATES = $(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
     445VBoxOGLerrorspu_SOURCES       = \
     446        $(VBOX_PATH_CROGL_GENFILES)/errorspu.c \
    501447        error/errorspu_init.c
    502448VBoxOGLerrorspu_SOURCES.win.x86 = error/error.def
    503 VBoxOGLerrorspu_CLEAN     := $(PATH_VBOXCROGL_GENFILES)/errorspu.c
    504 VBoxOGLerrorspu_LIBS.win   = $(PATH_LIB)/VBoxOGLcrutil$(VBOX_SUFF_LIB)
     449VBoxOGLerrorspu_CLEAN        := $(VBOX_PATH_CROGL_GENFILES)/errorspu.c
     450VBoxOGLerrorspu_LIBS.win      = $(PATH_LIB)/VBoxOGLcrutil$(VBOX_SUFF_LIB)
    505451if1of ($(KBUILD_TARGET), linux solaris darwin)
    506452 VBoxOGLerrorspu_LIBS += \
     
    508454endif
    509455
    510 VBoxOGLhosterrorspu_TEMPLATE = VBOXR3NP
     456VBoxOGLhosterrorspu_TEMPLATE = VBOXOGLR3GUESTHOST
    511457VBoxOGLhosterrorspu_EXTENDS  = VBoxOGLerrorspu
    512458VBoxOGLhosterrorspu_LIBS    += $(LIB_RUNTIME)
    513459VBoxOGLhosterrorspu_LIBS.win = $(PATH_LIB)/VBoxOGLhostcrutil$(VBOX_SUFF_LIB)
    514460VBoxOGLhosterrorspu_LDFLAGS.darwin += $(VBoxOGLerrorspu_LDFLAGS.darwin) -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxOGLhosterrorspu.dylib -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
    515 VBoxOGLhosterrorspu_LDFLAGS.linux += -Wl,--no-as-needed
    516461if1of ($(KBUILD_TARGET), linux solaris darwin)
    517462 VBoxOGLhosterrorspu_LIBS += \
     
    519464endif
    520465
     466$(VBOX_PATH_CROGL_GENFILES)/errorspu.c: $(PATH_SUB_CURRENT)/error/error.py $(VBOX_CROGL_API_FILES)
     467        $(call VBOX_CROGL_PYTHON_ENV,$(VBOX_CROGL_GUEST_HOST_PYTHONPATH),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
     468
    521469include $(KBUILD_PATH)/subfooter.kmk
    522470
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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