Makefile.kmk revision deeb074db1394b1313deaafe83f887c158eb6804
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# $Id$
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync## @file
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Makefile for the VirtualBox X11 keyboard library
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Copyright (C) 2006-2010 Oracle Corporation
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# available from http://www.virtualbox.org. This file is free software;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# you can redistribute it and/or modify it under the terms of the GNU
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# General Public License (GPL) as published by the Free Software
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncSUB_DEPTH = ../../../../..
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync DLLS += VBoxKeyboard
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync OTHERS += $(PATH_BIN)/vboxkeyboard.tar.bz2
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync OTHER_CLEAN += $(PATH_BIN)/vboxkeyboard.tar.bz2
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncendif
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# VBoxKeyboard - keyboard library for X11.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBoxKeyboard_TEMPLATE = VBOXR3
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBoxKeyboard_SOURCES = \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync keyboard.c
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBoxKeyboard_LIBS = X11
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# redistributed with usable sources.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# This rule will link create a temporary symlink to src/X11/ and tar
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# up the selected files into a tarball that is installed into the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# bin directory (probably belongs in /usr/shared/somewhere really,
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# but wtf, it's not like we're even trying to be FHS compliant).
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync## @todo this should be tar'ed down into the output directory and installed using an install target.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBOX_KEYBOARD_STAGE_DIR = $(PATH_TARGET)/VBoxKeyboard/install
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBOX_KEYBOARD_DEST_DIR = $(VBOX_KEYBOARD_STAGE_DIR)/VBoxKeyboard/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncINSTALLS += VBoxKeyboard-Files
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBoxKeyboard-Files_INST = $(subst $(PATH_TARGET),obj,$(VBOX_KEYBOARD_DEST_DIR))
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBoxKeyboard-Files_MODE = a+rx,u+w
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncVBoxKeyboard-Files_SOURCES = \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync COPYING.LIB \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync keyboard.c \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync keyboard-layouts.h \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync keyboard-list.h \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync keyboard-tables.h \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync keyboard-types.h \
Makefile \
../../../../../include/VBox/VBoxKeyboard.h=>VBox/VBoxKeyboard.h
$(PATH_BIN)/vboxkeyboard.tar.bz2: \
$(INSTARGET_VBoxKeyboard-Files) \
$(MAKEFILE_CURRENT)
$(call MSG_L1,Packing $@)
$(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
$(QUIET)$(MKDIR) -p $(@D)
ifeq ($(filter-out freebsd,$(KBUILD_TARGET)),)
$(QUIET)tar -cjf $@ \
-C $(VBOX_KEYBOARD_STAGE_DIR) VBoxKeyboard
else
$(QUIET)tar --owner 0 --group 0 --ignore-failed-read -cjRf $@ \
-C $(VBOX_KEYBOARD_STAGE_DIR) VBoxKeyboard
endif
$(QUIET)$(CHMOD) 0644 $@
include $(KBUILD_PATH)/subfooter.kmk