1 | # $Id: Makefile.kmk 98133 2023-01-19 11:40:07Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the VirtualBox X11 keyboard library
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
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 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | if1of ($(KBUILD_TARGET), freebsd linux openbsd netbsd solaris) # X11
|
---|
32 | DLLS += VBoxKeyboard
|
---|
33 | OTHERS += $(PATH_STAGE_BIN)/vboxkeyboard.tar.bz2
|
---|
34 | OTHER_CLEAN += $(PATH_STAGE_BIN)/vboxkeyboard.tar.bz2
|
---|
35 | endif
|
---|
36 |
|
---|
37 |
|
---|
38 | #
|
---|
39 | # VBoxKeyboard - keyboard library for X11.
|
---|
40 | #
|
---|
41 | VBoxKeyboard_TEMPLATE = VBoxR3Dll
|
---|
42 | VBoxKeyboard_SOURCES = \
|
---|
43 | keyboard.c
|
---|
44 | VBoxKeyboard_LIBS = X11
|
---|
45 | VBoxKeyboard_LIBPATH = $(VBOX_LIBPATH_X11)
|
---|
46 |
|
---|
47 |
|
---|
48 | #
|
---|
49 | # vboxkeyboard.tar.gz - the LGPLed keyboard library must always be
|
---|
50 | # redistributed with usable sources.
|
---|
51 | #
|
---|
52 | # This rule will link create a temporary symlink to src/X11/ and tar
|
---|
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 | #
|
---|
57 | VBOX_KEYBOARD_STAGE_DIR = $(PATH_TARGET)/VBoxKeyboard/install
|
---|
58 | VBOX_KEYBOARD_DEST_DIR = $(VBOX_KEYBOARD_STAGE_DIR)/VBoxKeyboard/
|
---|
59 |
|
---|
60 | ## @todo kBuild need support for copying files into _1_OUTDIR.
|
---|
61 | INSTALLS += VBoxKeyboard-Files
|
---|
62 | VBoxKeyboard-Files_INSTTYPE = stage
|
---|
63 | VBoxKeyboard-Files_INST = misc-staging/VBoxKeyboard/
|
---|
64 | VBoxKeyboard-Files_MODE = a+r,u+w
|
---|
65 | VBoxKeyboard-Files_SOURCES = \
|
---|
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
|
---|
74 |
|
---|
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: \
|
---|
82 | $$(VBoxKeyboard-Files_2_STAGE_TARGETS) \
|
---|
83 | $(MAKEFILE_CURRENT) \
|
---|
84 | | $$(dir $$@)
|
---|
85 | $(call MSG_L1,Packing $@)
|
---|
86 | $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
|
---|
87 | ifdef VBOX_GTAR
|
---|
88 | $(QUIET)$(VBOX_GTAR) --dereference --owner 0 --group 0 --ignore-failed-read \
|
---|
89 | -cjRf $@ \
|
---|
90 | -C $(PATH_STAGE)/$(VBoxKeyboard-Files_INST).. VBoxKeyboard
|
---|
91 | else
|
---|
92 | $(QUIET)tar -cjf $@ \
|
---|
93 | -C $(PATH_STAGE)/$(VBoxKeyboard-Files_INST).. VBoxKeyboard
|
---|
94 | endif
|
---|
95 | $(QUIET)$(CHMOD) 0644 $@
|
---|
96 |
|
---|
97 |
|
---|
98 |
|
---|
99 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
100 |
|
---|