# $Id: Makefile.kmk 31414 2010-08-05 15:43:28Z vboxsync $ ## @file # Sub-Makefile for the VBox Linux Additions X.org graphics driver. # # # Copyright (C) 2006-2007 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # SUB_DEPTH = ../../../../.. include $(KBUILD_PATH)/subheader.kmk # # vboxvideo_drv # if1of ($(KBUILD_TARGET), linux) SYSMODS += vboxvideo_drv vboxvideo_drv_TEMPLATE = VBOXGUESTR3XF86MOD vboxvideo_drv_DEFS.linux = linux vboxvideo_drv_DEFS.x86 = __i386__ # This one has to be defined when building server code on systems where # unslgned long is 64bits vboxvideo_drv_DEFS.amd64 += _XSERVER64 vboxvideo_drv_DEFS = \ _POSIX_C_SOURCE=199309L _POSIX_SOURCE _XOPEN_SOURCE \ _BSD_SOURCE _SVID_SOURCE _GNU_SOURCE SHAPE XINPUT XKB LBX XAPPGROUP \ XCSECURITY TOGCUP XF86BIGFONT DPMSExtension PIXPRIV PANORAMIX RENDER \ GCCUSESGAS AVOID_GLYPHBLT PIXPRIV SINGLEDEPTH XFreeXDGA XvExtension \ XFree86LOADER XFree86Server XF86VIDMODE XvMCExtension SMART_SCHEDULE \ BUILDDEBUG X_BYTE_ORDER=X_LITTLE_ENDIAN DNDEBUG FUNCPROTO=15 NARROWPROTO \ IN_MODULE XFree86Module vboxvideo_drv_INCS = \ $(VBOX_PATH_X11_XFREE_4_3)/include \ $(VBOX_PATH_X11_XFREE_4_3)/include/X11 \ $(VBOX_PATH_X11_XFREE_4_3)/include/X11/extensions \ $(VBOX_PATH_X11_XFREE_4_3)/include/extensions \ $(VBOX_PATH_X11_XFREE_4_3)/include/fonts \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/afb \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/include \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/fb \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86 \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/common \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/ddc \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/int10 \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/i2c \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/os-support \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/vbe \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/os-support/bus \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/rac \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/ramdac \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/shadowfb \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/vgahw \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/xf1bpp \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/xf24_32bpp \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/xf4bpp \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/mfb \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/mi \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/miext/shadow \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/render \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/randr \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/Xext vboxvideo_drv_SOURCES = \ vboxvideo_70.c \ vboxutils.c endif # target linux # # vboxvideo_drv_70 # # Remark: The other X.org drivers below are derived from this one. So, to make # that as simple as possible we do ifeq/if1of test here and extends the # base keywords instead of using .solaris or .linux. # Also it is *important* to use := and not = when deriving a properity. # DLLS += vboxvideo_drv_70 vboxvideo_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD if1of ($(KBUILD_TARGET), linux) vboxvideo_drv_70_CFLAGS += \ -Wno-conversion -Wno-unused-parameter $(VBOX_GCC_Wno-variadic-macros) # template? endif vboxvideo_drv_70_DEFS := \ XFree86Server IN_MODULE XFree86Module XFree86LOADER XORG_7X RENDER=1 ifeq ($(KBUILD_TARGET),solaris) # don't use .solaris or anything here. vboxvideo_drv_70_DEFS += _XPG6 __EXTENSIONS__ endif vboxvideo_drv_70_INCS = \ $(VBOX_PATH_X11_XORG_7_0) \ $(VBOX_PATH_X11_XORG_7_0)/X11 \ $(VBOX_PATH_X11_XORG_7_0)/xorg vboxvideo_drv_70_SOURCES = \ vboxvideo_70.c \ vboxutils.c # # vboxvideo_drv_71 # DLLS += vboxvideo_drv_71 vboxvideo_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD vboxvideo_drv_71_CFLAGS := $(vboxvideo_drv_70_CFLAGS) vboxvideo_drv_71_DEFS := $(vboxvideo_drv_70_DEFS) vboxvideo_drv_71_INCS = \ $(VBOX_PATH_X11_XORG_7_1) \ $(VBOX_PATH_X11_XORG_7_1)/X11 \ $(VBOX_PATH_X11_XORG_7_1)/xorg vboxvideo_drv_71_SOURCES = \ vboxvideo_70.c \ vboxutils.c # # vboxvideo_drv_13 # DLLS += vboxvideo_drv_13 vboxvideo_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD vboxvideo_drv_13_CFLAGS := $(vboxvideo_drv_70_CFLAGS) vboxvideo_drv_13_DEFS := $(vboxvideo_drv_70_DEFS) VBOXVIDEO_13 vboxvideo_drv_13_INCS = \ $(VBOX_PATH_X11_XORG_1_3) \ $(VBOX_PATH_X11_XORG_1_3)/X11 \ $(VBOX_PATH_X11_XORG_1_3)/xorg \ $(VBOX_PATH_X11_ROOT)/glproto-1.4.10 \ $(VBOX_PATH_X11_ROOT)/mesa-7.2/include \ $(VBOX_PATH_X11_ROOT)/libdrm-2.4.13 \ $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0 vboxvideo_drv_13_SOURCES = \ vboxvideo_13.c \ vboxutils.c # # vboxvideo_drv_14 # # This uses the same code (vboxvideo_13.c) as 1.3, but is built # for 1.4 as well in case there should be any relevant header changes. # DLLS += vboxvideo_drv_14 vboxvideo_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD vboxvideo_drv_14_CFLAGS := $(vboxvideo_drv_70_CFLAGS) vboxvideo_drv_14_DEFS := $(vboxvideo_drv_13_DEFS) vboxvideo_drv_14_INCS = \ $(VBOX_PATH_X11_XORG_1_4) \ $(VBOX_PATH_X11_XORG_1_4)/X11 \ $(VBOX_PATH_X11_XORG_1_4)/xorg \ $(VBOX_PATH_X11_ROOT)/glproto-1.4.10 \ $(VBOX_PATH_X11_ROOT)/mesa-7.2/include \ $(VBOX_PATH_X11_ROOT)/libdrm-2.4.13 \ $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0 vboxvideo_drv_14_SOURCES = \ vboxvideo_13.c \ vboxutils.c # # vboxvideo_drv_15 # DLLS += vboxvideo_drv_15 vboxvideo_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS) vboxvideo_drv_15_DEFS := $(vboxvideo_drv_13_DEFS) NO_ANSIC PCIACCESS \ VBOX_NO_LOW_COLOUR if1of ($(KBUILD_TARGET), linux solaris) vboxvideo_drv_15_DEFS += VBOX_DRI endif vboxvideo_drv_15_INCS = \ $(VBOX_PATH_X11_XORG_1_5) \ $(VBOX_PATH_X11_XORG_1_5)/X11 \ $(VBOX_PATH_X11_ROOT)/glproto-1.4.10 \ $(VBOX_PATH_X11_ROOT)/mesa-7.2/include \ $(VBOX_PATH_X11_ROOT)/libdrm-2.4.13 \ $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.5.3 vboxvideo_drv_15_SOURCES = \ vboxvideo_13.c \ vboxutils.c if1of ($(KBUILD_TARGET), linux solaris) vboxvideo_drv_15_SOURCES += \ vboxvideo_dri.c endif # # vboxvideo_drv_16 # DLLS += vboxvideo_drv_16 vboxvideo_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD vboxvideo_drv_16_CFLAGS := $(vboxvideo_drv_70_CFLAGS) vboxvideo_drv_16_DEFS := $(vboxvideo_drv_15_DEFS) vboxvideo_drv_16_INCS = \ $(VBOX_PATH_X11_XORG_1_6) \ $(VBOX_PATH_X11_XORG_1_6)/X11 \ $(VBOX_PATH_X11_ROOT)/glproto-1.4.10 \ $(VBOX_PATH_X11_ROOT)/mesa-7.2/include \ $(VBOX_PATH_X11_ROOT)/libdrm-2.4.13 \ $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local vboxvideo_drv_16_SOURCES := $(vboxvideo_drv_15_SOURCES) # # vboxvideo_drv_17 # DLLS += vboxvideo_drv_17 vboxvideo_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD vboxvideo_drv_17_CFLAGS := $(vboxvideo_drv_70_CFLAGS) vboxvideo_drv_17_DEFS := $(vboxvideo_drv_15_DEFS) ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local vboxvideo_drv_17_INCS = \ $(VBOX_PATH_X11_ROOT)/fontsproto-2.1.0 \ $(VBOX_PATH_X11_ROOT)/glproto-1.4.10 \ $(VBOX_PATH_X11_ROOT)/mesa-7.2/include \ $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \ $(VBOX_PATH_X11_ROOT)/libdrm-2.4.13 \ $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \ $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \ $(VBOX_PATH_X11_ROOT)/randrproto-1.3.0 \ $(VBOX_PATH_X11_ROOT)/renderproto-0.11 \ $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \ $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.99-20090831 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local \ $(VBOX_PATH_X11_ROOT)/xproto-7.0.15 vboxvideo_drv_17_SOURCES := $(vboxvideo_drv_15_SOURCES) # # vboxvideo_drv_18 # DLLS += vboxvideo_drv_18 vboxvideo_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD vboxvideo_drv_18_CFLAGS := $(vboxvideo_drv_70_CFLAGS) vboxvideo_drv_18_DEFS := $(vboxvideo_drv_15_DEFS) ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local vboxvideo_drv_18_INCS = \ $(VBOX_PATH_X11_ROOT)/fontsproto-2.1.0 \ $(VBOX_PATH_X11_ROOT)/glproto-1.4.10 \ $(VBOX_PATH_X11_ROOT)/mesa-7.2/include \ $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \ $(VBOX_PATH_X11_ROOT)/libdrm-2.4.13 \ $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \ $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \ $(VBOX_PATH_X11_ROOT)/randrproto-1.3.0 \ $(VBOX_PATH_X11_ROOT)/renderproto-0.11 \ $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \ $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.8.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local \ $(VBOX_PATH_X11_ROOT)/xproto-7.0.15 vboxvideo_drv_18_SOURCES := $(vboxvideo_drv_15_SOURCES) # Check the undefined symbols in the X.Org modules against lists of allowed # symbols. Not very elegant, but it will catch problems early. ifdef VBOX_WITH_TESTCASES # ifndef VBOX_ONLY_ADDITIONS if1of ($(KBUILD_TARGET),linux solaris) ifeq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH)) ifndef VBOX_ONLY_SDK OUR_PATH_VBOXVIDEO=$(PATH_ROOT)/src/VBox/Additions/x11/vboxvideo ifeq ($(KBUILD_TARGET),linux) TESTING += $(PATH_vboxvideo_drv)/tstvboxvideo68.run OTHERS += $(PATH_vboxvideo_drv)/tstvboxvideo68.run $$(PATH_vboxvideo_drv)/tstvboxvideo68.run: $$(INSTARGET_vboxvideo_drv) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv) $(OUR_PATH_VBOXVIDEO)/undefined_68 --static $(QUIET)$(APPEND) -t "$@" "done" endif TESTING += $(PATH_vboxvideo_drv_70)/tstvboxvideo70.run OTHERS += $(PATH_vboxvideo_drv_70)/tstvboxvideo70.run $$(PATH_vboxvideo_drv_70)/tstvboxvideo70.run: $$(INSTARGET_vboxvideo_drv_70) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv_70) $(OUR_PATH_VBOXVIDEO)/undefined_70 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(PATH_vboxvideo_drv_71)/tstvboxvideo71.run OTHERS += $(PATH_vboxvideo_drv_71)/tstvboxvideo71.run $$(PATH_vboxvideo_drv_71)/tstvboxvideo71.run: $$(INSTARGET_vboxvideo_drv_71) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv_71) $(OUR_PATH_VBOXVIDEO)/undefined_70 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(PATH_vboxvideo_drv_13)/tstvboxvideo13.run OTHERS += $(PATH_vboxvideo_drv_13)/tstvboxvideo13.run $$(PATH_vboxvideo_drv_13)/tstvboxvideo13.run: $$(INSTARGET_vboxvideo_drv_13) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv_13) $(OUR_PATH_VBOXVIDEO)/undefined_13 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(PATH_vboxvideo_drv_14)/tstvboxvideo14.run OTHERS += $(PATH_vboxvideo_drv_14)/tstvboxvideo14.run $$(PATH_vboxvideo_drv_14)/tstvboxvideo14.run: $$(INSTARGET_vboxvideo_drv_14) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv_14) $(OUR_PATH_VBOXVIDEO)/undefined_13 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(PATH_vboxvideo_drv_15)/tstvboxvideo15.run OTHERS += $(PATH_vboxvideo_drv_15)/tstvboxvideo15.run $$(PATH_vboxvideo_drv_15)/tstvboxvideo15.run: $$(INSTARGET_vboxvideo_drv_15) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv_15) $(OUR_PATH_VBOXVIDEO)/undefined_13 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(PATH_vboxvideo_drv_16)/tstvboxvideo16.run OTHERS += $(PATH_vboxvideo_drv_16)/tstvboxvideo16.run $$(PATH_vboxvideo_drv_16)/tstvboxvideo16.run: $$(INSTARGET_vboxvideo_drv_16) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv_16) $(OUR_PATH_VBOXVIDEO)/undefined_13 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(PATH_vboxvideo_drv_17)/tstvboxvideo17.run OTHERS += $(PATH_vboxvideo_drv_17)/tstvboxvideo17.run $$(PATH_vboxvideo_drv_17)/tstvboxvideo17.run: $$(INSTARGET_vboxvideo_drv_17) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv_17) $(OUR_PATH_VBOXVIDEO)/undefined_13 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(PATH_vboxvideo_drv_18)/tstvboxvideo18.run OTHERS += $(PATH_vboxvideo_drv_18)/tstvboxvideo18.run $$(PATH_vboxvideo_drv_18)/tstvboxvideo18.run: $$(INSTARGET_vboxvideo_drv_18) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(INSTARGET_vboxvideo_drv_18) $(OUR_PATH_VBOXVIDEO)/undefined_13 $(QUIET)$(APPEND) -t "$@" "done" endif # ! VBOX_ONLY_SDK endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH)) endif # eq ($(KBUILD_TARGET),linux) # endif # ! VBOX_ONLY_ADDITIONS endif # VBOX_WITH_TESTCASES include $(KBUILD_PATH)/subfooter.kmk