# $Id: Makefile.kmk 39809 2012-01-19 13:37:03Z vboxsync $ ## @file # Sub-Makefile for the VBox Additions XFree86 and X.org mouse drivers. # # # 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 # # vboxmouse_drv # if1of ($(KBUILD_TARGET), linux) SYSMODS += vboxmouse_drv vboxmouse_drv_TEMPLATE = VBOXGUESTR3XF86MOD vboxmouse_drv_DEFS.linux = linux vboxmouse_drv_DEFS.x86 += __i386__ # This one has to be defined when building server code on systems where # unsigned long is 64bits vboxmouse_drv_DEFS.amd64 += _XSERVER64 vboxmouse_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 PNP_MOUSE IN_XF86_MODULE vboxmouse_drv_INCS := \ $(VBOX_PATH_X11_XFREE_4_3)/include \ $(VBOX_PATH_X11_XFREE_4_3)/include/extensions \ $(VBOX_PATH_X11_XFREE_4_3)/include/X11 \ $(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/os-support \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/hw/xfree86/os-support/bus \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/mi \ $(VBOX_PATH_X11_XFREE_4_3)/programs/Xserver/include \ $(PATH_SUB_CURRENT) vboxmouse_drv_SOURCES = \ vboxmouse_15.c # Any global symbols in the driver object files will be added to XFree86's # symbol table, which can cause problems if we e.g. define a symbol in two # modules. vboxmouse_drv_POST_CMDS = \ objcopy --keep-global-symbol vboxmouseModuleData $(out) $(out)-objcopy$$(NLTAB) \ $(MV) -f $(out)-objcopy $(out) endif # # vboxmouse_drv_70 # DLLS += vboxmouse_drv_70 vboxmouse_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_70_DEFS = \ XFree86Server IN_MODULE XFree86Module XFree86LOADER XINPUT XORG_7X IN_XF86_MODULE DONT_DEFINE_WRAPPERS NO_ANSIC ifeq ($(KBUILD_TARGET),solaris) # don't use .solaris or anything here. vboxmouse_drv_70_DEFS += _XPG6 __EXTENSIONS__ endif vboxmouse_drv_70_INCS := \ $(VBOX_PATH_X11_XORG_7_0) \ $(VBOX_PATH_X11_XORG_7_0)/X11 \ $(VBOX_PATH_X11_XORG_7_0)/xorg \ $(PATH_SUB_CURRENT) vboxmouse_drv_70_SOURCES = \ vboxmouse_15.c # # vboxmouse_drv_71 # DLLS += vboxmouse_drv_71 vboxmouse_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_71_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC vboxmouse_drv_71_INCS := \ $(VBOX_PATH_X11_XORG_7_1) \ $(VBOX_PATH_X11_XORG_7_1)/X11 \ $(VBOX_PATH_X11_XORG_7_1)/xorg \ $(PATH_SUB_CURRENT) vboxmouse_drv_71_SOURCES = \ vboxmouse_15.c # # vboxmouse_drv_13 # DLLS += vboxmouse_drv_13 vboxmouse_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_13_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC vboxmouse_drv_13_INCS := \ $(VBOX_PATH_X11_XORG_1_3) \ $(VBOX_PATH_X11_ROOT)/inputproto-1.4.4 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.3.0.0 \ $(PATH_SUB_CURRENT) vboxmouse_drv_13_SOURCES = \ vboxmouse_15.c # # vboxmouse_drv_14 # DLLS += vboxmouse_drv_14 vboxmouse_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_14_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC vboxmouse_drv_14_INCS := \ $(VBOX_PATH_X11_XORG_1_4) \ $(VBOX_PATH_X11_XORG_1_4)/xorg \ $(PATH_SUB_CURRENT) vboxmouse_drv_14_SOURCES = \ vboxmouse_15.c # # vboxmouse_drv_15 # DLLS += vboxmouse_drv_15 vboxmouse_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_15_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC vboxmouse_drv_15_INCS := \ $(VBOX_PATH_X11_XORG_1_5) \ $(VBOX_PATH_X11_ROOT)/inputproto-1.4.4 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.5.3 \ $(PATH_SUB_CURRENT) vboxmouse_drv_15_SOURCES = \ vboxmouse_15.c # # vboxmouse_drv_16 # DLLS += vboxmouse_drv_16 vboxmouse_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_16_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC vboxmouse_drv_16_INCS := \ $(VBOX_PATH_X11_XORG_1_6) \ $(VBOX_PATH_X11_ROOT)/inputproto-1.4.4 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local \ $(PATH_SUB_CURRENT) vboxmouse_drv_16_SOURCES = \ vboxmouse_15.c ifneq ($(KBUILD_TARGET), linux) # # vboxmouse_drv_17 # DLLS += vboxmouse_drv_17 vboxmouse_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_17_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local vboxmouse_drv_17_INCS := \ $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \ $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \ $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \ $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \ $(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.18 \ $(PATH_SUB_CURRENT) vboxmouse_drv_17_SOURCES = \ vboxmouse_15.c # # vboxmouse_drv_18 # DLLS += vboxmouse_drv_18 vboxmouse_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_18_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local vboxmouse_drv_18_INCS := \ $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \ $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \ $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \ $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \ $(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.18 \ $(PATH_SUB_CURRENT) vboxmouse_drv_18_SOURCES = \ vboxmouse_15.c # # vboxmouse_drv_19 # DLLS += vboxmouse_drv_19 vboxmouse_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_19_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local vboxmouse_drv_19_INCS := \ $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \ $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \ $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \ $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.9.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local \ $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \ $(PATH_SUB_CURRENT) vboxmouse_drv_19_SOURCES = \ vboxmouse_15.c # # vboxmouse_drv_110 # DLLS += vboxmouse_drv_110 vboxmouse_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD vboxmouse_drv_110_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC ## @todo replace $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local vboxmouse_drv_110_INCS := \ $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \ $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \ $(VBOX_PATH_X11_ROOT)/pixman-0.16.0 \ $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.10.0 \ $(VBOX_PATH_X11_ROOT)/xorg-server-1.6.0-local \ $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \ $(PATH_SUB_CURRENT) vboxmouse_drv_110_SOURCES = \ vboxmouse_15.c endif # neq ($(KBUILD_TARGET),linux) # 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 VBOXMOUSE_SRC_PATH := $(PATH_SUB_CURRENT) ifeq ($(KBUILD_TARGET),linux) TESTING += $(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run OTHERS += $(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run $$(vboxmouse_drv_0_OUTDIR)/tstvboxmouse68.run: $$(vboxmouse_drv_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ "$(vboxmouse_drv_1_STAGE_TARGET)" "$(VBOXMOUSE_SRC_PATH)/undefined_15" --static $(QUIET)$(APPEND) -t "$@" "done" endif TESTING += $(vboxmouse_drv_70_0_OUTDIR)/tstvboxmouse70.run OTHERS += $(vboxmouse_drv_70_0_OUTDIR)/tstvboxmouse70.run $$(vboxmouse_drv_70_0_OUTDIR)/tstvboxmouse70.run: $$(vboxmouse_drv_70_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_70_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(vboxmouse_drv_71_0_OUTDIR)/tstvboxmouse71.run OTHERS += $(vboxmouse_drv_71_0_OUTDIR)/tstvboxmouse71.run $$(vboxmouse_drv_71_0_OUTDIR)/tstvboxmouse71.run: $$(vboxmouse_drv_71_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_71_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(vboxmouse_drv_13_0_OUTDIR)/tstvboxmouse13.run OTHERS += $(vboxmouse_drv_13_0_OUTDIR)/tstvboxmouse13.run $$(vboxmouse_drv_13_0_OUTDIR)/tstvboxmouse13.run: $$(vboxmouse_drv_13_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_13_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(vboxmouse_drv_14_0_OUTDIR)/tstvboxmouse14.run OTHERS += $(vboxmouse_drv_14_0_OUTDIR)/tstvboxmouse14.run $$(vboxmouse_drv_14_0_OUTDIR)/tstvboxmouse14.run: $$(vboxmouse_drv_14_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_14_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(vboxmouse_drv_15_0_OUTDIR)/tstvboxmouse15.run OTHERS += $(vboxmouse_drv_15_0_OUTDIR)/tstvboxmouse15.run $$(vboxmouse_drv_15_0_OUTDIR)/tstvboxmouse15.run: $$(vboxmouse_drv_15_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_15_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(vboxmouse_drv_16_0_OUTDIR)/tstvboxmouse16.run OTHERS += $(vboxmouse_drv_16_0_OUTDIR)/tstvboxmouse16.run $$(vboxmouse_drv_16_0_OUTDIR)/tstvboxmouse16.run: $$(vboxmouse_drv_16_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_16_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" ifneq ($(KBUILD_TARGET), linux) TESTING += $(vboxmouse_drv_17_0_OUTDIR)/tstvboxmouse17.run OTHERS += $(vboxmouse_drv_17_0_OUTDIR)/tstvboxmouse17.run $$(vboxmouse_drv_17_0_OUTDIR)/tstvboxmouse17.run: $$(vboxmouse_drv_17_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_17_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(vboxmouse_drv_18_0_OUTDIR)/tstvboxmouse18.run OTHERS += $(vboxmouse_drv_18_0_OUTDIR)/tstvboxmouse18.run $$(vboxmouse_drv_18_0_OUTDIR)/tstvboxmouse18.run: $$(vboxmouse_drv_18_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_18_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(vboxmouse_drv_19_0_OUTDIR)/tstvboxmouse19.run OTHERS += $(vboxmouse_drv_19_0_OUTDIR)/tstvboxmouse19.run $$(vboxmouse_drv_19_0_OUTDIR)/tstvboxmouse19.run: $$(vboxmouse_drv_19_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_19_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" TESTING += $(vboxmouse_drv_110_0_OUTDIR)/tstvboxmouse110.run OTHERS += $(vboxmouse_drv_110_0_OUTDIR)/tstvboxmouse110.run $$(vboxmouse_drv_110_0_OUTDIR)/tstvboxmouse110.run: $$(vboxmouse_drv_110_1_STAGE_TARGET) $(QUIET)$(call MSG_L1,Checking for unresolved symbols in $<) $(QUIET)/bin/sh $(PATH_ROOT)/src/bldprogs/checkUndefined.sh $(KBUILD_TARGET) \ $(vboxmouse_drv_110_1_STAGE_TARGET) $(VBOXMOUSE_SRC_PATH)/undefined_15 $(QUIET)$(APPEND) -t "$@" "done" endif # neq ($(KBUILD_TARGET),linux) endif # ! VBOX_ONLY_SDK endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH)) endif # 1of ($(KBUILD_TARGET),linux solaris) # endif # ! VBOX_ONLY_ADDITIONS endif # VBOX_WITH_TESTCASES include $(KBUILD_PATH)/subfooter.kmk