VirtualBox

source: vbox/trunk/src/VBox/ExtPacks/VNC/Makefile.kmk

Last change on this file was 106061, checked in by vboxsync, 4 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.4 KB
Line 
1# $Id: Makefile.kmk 106061 2024-09-16 14:03:52Z vboxsync $
2## @file
3# Sub-Makefile for the VNC Extension Pack.
4#
5
6#
7# Copyright (C) 2010-2024 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
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31#
32# Extend the extension pack templates.
33#
34TEMPLATE_VBoxR3ExtPackVNC = For the ring-3 context modules in the VNC extension pack.
35TEMPLATE_VBoxR3ExtPackVNC_EXTENDS = VBoxR3ExtPack
36TEMPLATE_VBoxR3ExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
37
38TEMPLATE_VBoxR0ExtPackVNC = For the ring-0 context modules in the VNC extension pack.
39TEMPLATE_VBoxR0ExtPackVNC_EXTENDS = VBoxR0ExtPack
40TEMPLATE_VBoxR0ExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
41
42TEMPLATE_VBoxRcExtPackVNC = For the raw-mode context modules in the VNC extension pack.
43TEMPLATE_VBoxRcExtPackVNC_EXTENDS = VBoxRcExtPack
44TEMPLATE_VBoxRcExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
45
46TEMPLATE_VBoxInsExtPackVNC = For the install targets of an extension pack.
47TEMPLATE_VBoxInsExtPackVNC_EXTENDS = VBoxR0ExtPack
48TEMPLATE_VBoxInsExtPackVNC_INST = $(INST_EXTPACK)VNC/
49
50#
51# Globals.
52#
53VBOX_VNC_NAME = VNC
54VBOX_VNC_MANGLED_NAME = VNC
55VBOX_PATH_EXTPACK_VNC = $(PATH_STAGE)/$(INST_EXTPACK)VNC
56
57#
58# VBoxVNCMain - The module which the VirtualBox Main API talks to.
59#
60DLLS += VBoxVNCMain
61VBoxVNCMain_TEMPLATE = VBoxR3ExtPackVNC
62VBoxVNCMain_SOURCES = VBoxVNCMain.cpp
63VBoxVNCMain_DEFS =
64
65#
66# VBoxVNC - The VNC VRDE module.
67#
68DLLS += VBoxVNC
69VBoxVNC_TEMPLATE = VBoxR3ExtPackVNC
70VBoxVNC_SOURCES = VBoxVNC.cpp
71# NOTE: vncserver is covered by GPL, so the extpack must be GPL, too.
72VBoxVNC_LIBS = vncserver
73VBoxVNC_DEFS =
74
75#
76# Install the description.
77#
78INSTALLS += VBoxVNCIns
79VBoxVNCIns_TEMPLATE = VBoxInsExtPackVNC
80VBoxVNCIns_SOURCES = \
81 $(VBoxVNCIns_0_OUTDIR)/ExtPack.xml \
82 $(PATH_ROOT)/doc/License-gpl-2.html=>ExtPack-license.html \
83 $(PATH_ROOT)/doc/License-gpl-2.txt=>ExtPack-license.txt \
84 $(PATH_ROOT)/doc/License-gpl-2.rtf=>ExtPack-license.rtf
85$(call VBOX_EDIT_VERSION_RULE_FN,VBoxVNCIns,ExtPack.xml)
86
87
88#
89# Packing.
90#
91ifndef VBOX_WITHOUT_EXTPACK_VNC_PACKING
92 PACKING += $(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack
93endif
94
95ifndef VBOX_WITH_EXTPACK_OS_ARCHS
96 VBOX_WITH_EXTPACK_OS_ARCHS = $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)
97endif
98
99# Build the file list. The macro takes 1=darwin.x86, 2=dist/VirtualBox.app/Contents/MacOS, 3=dylib
100VBOX_VNC_FILES_MACRO = \
101 $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_VNC_MANGLED_NAME)/$(1)/VBoxVNCMain.$(3)=>$(1)/VBoxVNCMain.$(3) \
102 $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_VNC_MANGLED_NAME)/$(1)/VBoxVNC.$(3)=>$(1)/VBoxVNC.$(3)
103
104VBOX_VNC_FILES := \
105 $(VBOX_PATH_EXTPACK_VNC)/ExtPack.xml=>ExtPack.xml \
106 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.html=>ExtPack-license.html \
107 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.rtf=>ExtPack-license.rtf \
108 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.txt=>ExtPack-license.txt
109
110
111if1of (darwin.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
112 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,darwin.amd64,dist/VirtualBox.app/Contents/MacOS,dylib)
113endif
114if1of (darwin.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
115 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,darwin.x86,dist/VirtualBox.app/Contents/MacOS,dylib)
116endif
117if1of (freebsd.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
118 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,freebsd.amd64,bin,so)
119endif
120if1of (freebsd.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
121 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,freebsd.x86,bin,so)
122endif
123if1of (linux.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
124 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,linux.amd64,bin,so)
125endif
126if1of (linux.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
127 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,linux.x86,bin,so)
128endif
129if1of (os2.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
130 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,os2.x86,bin,so)
131endif
132if1of (solaris.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
133 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,solaris.amd64,bin,so)
134endif
135if1of (solaris.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
136 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,solaris.x86,bin,so)
137endif
138if1of (win.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
139 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,win.amd64,bin,dll)
140endif
141if1of (win.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
142 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,win.x86,bin,dll)
143endif
144
145# Pack it all up using a temporary staging directory.
146$(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack: \
147 $$(foreach file, $$(VBOX_VNC_FILES), $$(firstword $$(subst =>,$$(SP),$$(file)))) \
148 | $(VBOX_PATH_PACKAGES)/
149 $(RM) -f $(wildcard $(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-*.vbox-extpack) \
150 $(VBoxVNCIns_0_OUTDIR)/ExtPack.manifest \
151 $(VBoxVNCIns_0_OUTDIR)/ExtPack.signature
152# Stage all the files
153 $(RM) -Rf $(VBoxVNCIns_0_OUTDIR)/Stage/
154 $(foreach file, $(VBOX_VNC_FILES),\
155 $(NLTAB)$(MKDIR) -p $(dir $(lastword $(subst =>,$(SP)$(VBoxVNCIns_0_OUTDIR)/Stage/,$(file)))) \
156 $(NLTAB)$(CP) $(subst =>,$(SP)$(VBoxVNCIns_0_OUTDIR)/Stage/,$(file)) )
157# Create the manifest
158 $(VBOX_RTMANIFEST) \
159 --manifest $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.manifest \
160 --chdir $(VBoxVNCIns_0_OUTDIR)/Stage/ \
161 $(foreach file, $(VBOX_VNC_FILES), $(lastword $(subst =>,$(SP),$(file))))
162 $(APPEND) $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.signature "todo"
163 $(CHMOD) a+r \
164 $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.manifest \
165 $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.signature
166# Tar it up.
167 tar -cvf - -C $(VBoxVNCIns_0_OUTDIR)/Stage/ . | gzip -9c > $@
168# Clean up
169 $(RM) -Rf $(VBoxVNCIns_0_OUTDIR)/Stage/
170
171BLDDIRS += $(VBOX_PATH_PACKAGES)/
172
173include $(FILE_KBUILD_SUB_FOOTER)
174
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette