[26634] | 1 | # $Id: Makefile.kmk 98133 2023-01-19 11:40:07Z vboxsync $
|
---|
[2478] | 2 | ## @file
|
---|
[29654] | 3 | # Makefile for the VirtualBox X11 keyboard library
|
---|
[382] | 4 | #
|
---|
| 5 |
|
---|
| 6 | #
|
---|
[98103] | 7 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
[4398] | 8 | #
|
---|
[96407] | 9 | # This file is part of VirtualBox base platform packages, as
|
---|
| 10 | # available from https://www.virtualbox.org.
|
---|
[5999] | 11 | #
|
---|
[96407] | 12 | # This program is free software; you can redistribute it and/or
|
---|
| 13 | # modify it under the terms of the GNU General Public License
|
---|
| 14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 15 | # License.
|
---|
| 16 | #
|
---|
| 17 | # This program is distributed in the hope that it will be useful, but
|
---|
| 18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 20 | # General Public License for more details.
|
---|
| 21 | #
|
---|
| 22 | # You should have received a copy of the GNU General Public License
|
---|
| 23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 24 | #
|
---|
| 25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
| 26 | #
|
---|
[382] | 27 |
|
---|
[29654] | 28 | SUB_DEPTH = ../../../../..
|
---|
[12257] | 29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
[10579] | 30 |
|
---|
[29774] | 31 | if1of ($(KBUILD_TARGET), freebsd linux openbsd netbsd solaris) # X11
|
---|
[29654] | 32 | DLLS += VBoxKeyboard
|
---|
[38082] | 33 | OTHERS += $(PATH_STAGE_BIN)/vboxkeyboard.tar.bz2
|
---|
| 34 | OTHER_CLEAN += $(PATH_STAGE_BIN)/vboxkeyboard.tar.bz2
|
---|
[4875] | 35 | endif
|
---|
[959] | 36 |
|
---|
[12519] | 37 |
|
---|
[4875] | 38 | #
|
---|
| 39 | # VBoxKeyboard - keyboard library for X11.
|
---|
| 40 | #
|
---|
[98133] | 41 | VBoxKeyboard_TEMPLATE = VBoxR3Dll
|
---|
[10420] | 42 | VBoxKeyboard_SOURCES = \
|
---|
[29654] | 43 | keyboard.c
|
---|
[10420] | 44 | VBoxKeyboard_LIBS = X11
|
---|
| 45 | VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
|
---|
[3945] | 46 |
|
---|
[4875] | 47 |
|
---|
| 48 | #
|
---|
[6560] | 49 | # vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
|
---|
| 50 | # redistributed with usable sources.
|
---|
| 51 | #
|
---|
[12498] | 52 | # This rule will link create a temporary symlink to src/X11/ and tar
|
---|
[10345] | 53 | # up the selected files into a tarball that is installed into the
|
---|
| 54 | # bin directory (probably belongs in /usr/shared/somewhere really,
|
---|
| 55 | # but wtf, it's not like we're even trying to be FHS compliant).
|
---|
| 56 | #
|
---|
[29654] | 57 | VBOX_KEYBOARD_STAGE_DIR = $(PATH_TARGET)/VBoxKeyboard/install
|
---|
| 58 | VBOX_KEYBOARD_DEST_DIR = $(VBOX_KEYBOARD_STAGE_DIR)/VBoxKeyboard/
|
---|
[6560] | 59 |
|
---|
[38082] | 60 | ## @todo kBuild need support for copying files into _1_OUTDIR.
|
---|
[29654] | 61 | INSTALLS += VBoxKeyboard-Files
|
---|
[38082] | 62 | VBoxKeyboard-Files_INSTTYPE = stage
|
---|
| 63 | VBoxKeyboard-Files_INST = misc-staging/VBoxKeyboard/
|
---|
| 64 | VBoxKeyboard-Files_MODE = a+r,u+w
|
---|
| 65 | VBoxKeyboard-Files_SOURCES = \
|
---|
[98133] | 66 | COPYING.LIB \
|
---|
| 67 | keyboard.c \
|
---|
| 68 | keyboard-layouts.h \
|
---|
| 69 | keyboard-list.h \
|
---|
| 70 | keyboard-tables.h \
|
---|
| 71 | keyboard-types.h \
|
---|
| 72 | Makefile \
|
---|
| 73 | ../../../../../include/VBox/VBoxKeyboard.h=>VBox/VBoxKeyboard.h
|
---|
[12256] | 74 |
|
---|
[38082] | 75 | INSTALLS += VBoxKeyboard-Tarball
|
---|
| 76 | VBoxKeyboard-Tarball_INST = $(INST_BIN)
|
---|
| 77 | VBoxKeyboard-Tarball_MODE = a+r,u+w
|
---|
| 78 | VBoxKeyboard-Tarball_SOURCES = $(VBoxKeyboard-Tarball_0_OUTDIR)/vboxkeyboard.tar.bz2
|
---|
| 79 | VBoxKeyboard-Tarball_CLEAN = $(VBoxKeyboard-Tarball_0_OUTDIR)/vboxkeyboard.tar.bz2
|
---|
| 80 |
|
---|
| 81 | $$(VBoxKeyboard-Tarball_0_OUTDIR)/vboxkeyboard.tar.bz2: \
|
---|
[38158] | 82 | $$(VBoxKeyboard-Files_2_STAGE_TARGETS) \
|
---|
[38082] | 83 | $(MAKEFILE_CURRENT) \
|
---|
| 84 | | $$(dir $$@)
|
---|
[29654] | 85 | $(call MSG_L1,Packing $@)
|
---|
| 86 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
[36222] | 87 | ifdef VBOX_GTAR
|
---|
[38466] | 88 | $(QUIET)$(VBOX_GTAR) --dereference --owner 0 --group 0 --ignore-failed-read \
|
---|
[38465] | 89 | -cjRf $@ \
|
---|
[38082] | 90 | -C $(PATH_STAGE)/$(VBoxKeyboard-Files_INST).. VBoxKeyboard
|
---|
[29748] | 91 | else
|
---|
[36222] | 92 | $(QUIET)tar -cjf $@ \
|
---|
[38082] | 93 | -C $(PATH_STAGE)/$(VBoxKeyboard-Files_INST).. VBoxKeyboard
|
---|
[29748] | 94 | endif
|
---|
[29654] | 95 | $(QUIET)$(CHMOD) 0644 $@
|
---|
[11725] | 96 |
|
---|
[38082] | 97 |
|
---|
| 98 |
|
---|
[41477] | 99 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
[38082] | 100 |
|
---|