VirtualBox

source: vbox/trunk/src/VBox/Installer/linux/Makefile.kmk@ 6637

Last change on this file since 6637 was 6637, checked in by vboxsync, 17 years ago

install rdesktop-vrdp with Linux packages

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.4 KB
Line 
1# $Id: Makefile.kmk 6637 2008-01-30 22:03:50Z vboxsync $
2## @file
3# Makefile for the Linux installer.
4#
5
6#
7# Copyright (C) 2006-2007 innotek GmbH
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18DEPTH = ../../../..
19include $(PATH_KBUILD)/header.kmk
20
21ifneq ($(BUILD_PLATFORM),linux)
22$(error "The Linux installer can only be built on Linux!") # yeah, right.
23endif
24
25VBOX_NO_LINUX_RUN_INSTALLER ?= $(VBOX_OSE)
26
27PROGRAMS = VBoxTunctl
28PACKING = $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,$(PATH_BIN)/VirtualBox.run)
29PACKING += $(PATH_BIN)/VirtualBox.tar.bz2
30OTHER_CLEAN = $(addprefix $(PATH_TARGET)/install/,\
31 install.sh deffiles routines.sh \
32 VBoxAddIF.sh vboxdrv.sh vboxnet.sh \
33 VirtualBox.tar.bz2 LICENSE) \
34 $(wildcard $(PATH_TARGET)/VirtualBox-*)
35INSTALLS = linux-bin linux-doc
36
37VBoxTunctl_TEMPLATE = VBOXR3EXE
38VBoxTunctl_SOURCES = tunctl.c
39
40#
41# Linux installs.
42#
43linux-bin_INST = bin/
44linux-bin_MODE = a+rx,u+w
45linux-bin_SOURCES = \
46 VBoxSysInfo.sh \
47 VBox.sh=>VBox.sh
48
49linux-doc_INST = bin/
50linux-doc_MODE = a+r,u+w
51linux-doc_SOURCES = \
52 $(if $(VBOX_OSE),,$(PATH_ROOT)/doc/License.txt=>LICENSE) \
53 VBox.png=>VBox.png
54
55# Strip these binaries
56LINUXSTRIPBIN = \
57 VBoxDD.so \
58 VBoxDD2.so \
59 VBoxManage \
60 VBoxREM.so \
61 VBoxRT.so \
62 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
63 VBoxSettings.so \
64 VBoxSVC \
65 VBoxDDU.so \
66 VBoxVMM.so \
67 VBoxXPCOM.so \
68 VBoxXPCOMIPCD \
69 $(if $(VBOX_WITH_QTGUI),VBoxKeyboard.so,) \
70 $(if $(VBOX_WITH_QTGUI),VirtualBox,) \
71 tstVMM \
72 VBoxTunctl \
73 components/VBoxC.so \
74 components/VBoxSVCM.so \
75 components/VBoxXPCOMIPCC.so
76
77# Do not remove relocation information of these binaries
78LINUXSTRIPOBJ = \
79 VBoxDD2GC.gc \
80 VBoxDD2R0.r0 \
81 VBoxDDGC.gc \
82 VBoxDDR0.r0 \
83 VMMGC.gc \
84 VMMR0.r0
85ifeq ($(BUILD_TARGET_ARCH),amd64)
86LINUXSTRIPOBJ += \
87 VBoxREM2.rel
88endif
89
90# Do not strip anything of these files
91LINUXNOSTRIP = \
92 $(if $(VBOX_OSE),,LICENSE) \
93 $(if $(VBOX_WITH_QTGUI),\
94 $(if $(VBOX_OSE),,License-$(VBOX_LICENSE_VER).html)) \
95 components/VBoxXPCOMBase.xpt \
96 components/VirtualBox_XPCOM.xpt \
97 VBoxSysInfo.sh \
98 VBox.sh \
99 VBox.png \
100 VBoxAddIF.sh \
101 $(if $(VBOX_WITH_QTGUI),VirtualBox.desktop,) \
102 $(if $(VBOX_WITH_QTGUI),$(foreach f,\
103 $(shell $(CAT_EXT) \
104 $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.txt),\
105 nls/VirtualBox_$(f).qm nls/qt_$(f).qm),) \
106 src \
107 sdk
108
109# Guest Additions
110LINUXNOSTRIP += \
111 $(if $(VBOX_OSE),,additions/VBoxGuestAdditions.iso)
112
113# Shared Folders
114LINUXSTRIPBIN += \
115 VBoxSharedFolders.so \
116 $(if $(VBOX_OSE),,VRDPAuth.so)
117
118# Shared Clipboard
119LINUXSTRIPBIN += \
120 VBoxSharedClipboard.so \
121 $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so,)
122
123ifdef VBOX_WITH_DOCS
124 LINUXNOSTRIP += \
125 UserManual.pdf
126 LINUXSTRIPBIN += \
127 $(if $(VBOX_WITH_QTGUI),kchmviewer,)
128 ifneq ($(wildcard $(PATH_BIN)/VirtualBox.chm),)
129 # our 64-bit tinderboxes are not able to generate VirtualBox.chm so far
130 # but for building .deb/.rpm packages we use precompiled binaries.
131 LINUXNOSTRIP += \
132 VirtualBox.chm
133 endif
134 ifneq ($(wildcard $(PATH_BIN)/VirtualBoxAPI.chm),)
135 # same applies to VirtualBoxAPI.chm
136 LINUXNOSTRIP += \
137 VirtualBoxAPI.chm
138 endif
139endif
140ifdef VBOX_WITH_VRDP
141 LINUXSTRIPBIN += \
142 VBoxVRDP.so \
143 VBoxVRDP
144
145 LINUXNOSTRIP += \
146 rdesktop-vrdp.tar.gz \
147 rdesktop-vrdp-keymaps \
148 rdesktop-vrdp
149endif
150ifdef VBOX_WITH_HEADLESS
151 LINUXSTRIPBIN += \
152 VBoxHeadless
153endif
154ifdef VBOX_WITH_WEBSERVICES
155 LINUXSTRIPBIN += \
156 vboxwebsrv \
157 webtest
158endif
159
160LINUXARCHFILES := $(LINUXSTRIPBIN) $(LINUXSTRIPOBJ) $(LINUXNOSTRIP)
161
162OTHER_CLEAN += $(addprefix $(PATH_TARGET)/archive/,$(LINUXARCHFILES))
163
164include $(PATH_KBUILD)/footer.kmk
165
166$(PATH_BIN)/VirtualBox.run: \
167 $(PATH_TARGET)/install/VirtualBox.tar.bz2 \
168 install.sh \
169 $(VBOX_VERSION_STAMP) \
170 routines.sh \
171 deffiles \
172 vboxnet.sh \
173 vboxdrv.sh \
174 $(if $(VBOX_OSE),,$(PATH_ROOT)/doc/License.txt)
175 $(call MSG_TOOL,makeself,,,$@)
176 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \
177 -e "s;_BUILD_;$(shell date);g" \
178 -e "s;_ARCH_;${BUILD_TARGET_ARCH};g" \
179 < install.sh > $(PATH_TARGET)/install/install.sh
180 $(QUIET)chmod 0744 $(PATH_TARGET)/install/install.sh
181 $(QUIET)$(INSTALL) -m 0755 routines.sh $(PATH_TARGET)/install
182 $(QUIET)$(INSTALL) -m 0755 deffiles $(PATH_TARGET)/install
183 $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_ROOT)/doc/License.txt $(PATH_TARGET)/install/LICENSE)
184 $(QUIET)$(INSTALL) -m 0755 vboxnet.sh $(PATH_TARGET)/install
185 $(QUIET)$(INSTALL) -m 0755 vboxdrv.sh $(PATH_TARGET)/install
186 $(QUIET)$(RM) -f $@
187 $(QUIET)$(VBOX_MAKESELF) --follow $(PATH_TARGET)/install $@ \
188 "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
189
190# .tar.bz2 for converting into .run
191$(PATH_TARGET)/install/VirtualBox.tar.bz2: \
192 $(addprefix $(PATH_TARGET)/archive/, $(LINUXARCHFILES)) \
193 Makefile.kmk \
194 $(VBOX_VERSION_STAMP) \
195 $(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING)
196 $(call MSG_L1,Packing $@)
197 $(QUIET)$(MKDIR) -p $(@D)
198 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING) $(LINUXARCHFILES)
199 $(QUIET)chmod 0644 $@
200
201# .tar.bz2 for distribution
202$(PATH_BIN)/VirtualBox.tar.bz2: \
203 $(addprefix $(PATH_TARGET)/archive/, $(LINUXARCHFILES)) \
204 Makefile.kmk \
205 $(VBOX_VERSION_STAMP) \
206 $(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING)
207 $(call MSG_L1,Packing $@)
208 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
209 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(PATH_TARGET) \
210 $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(LINUXARCHFILES))
211
212$(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING): $(PATH_TARGET)/archive
213 $(call MSG_INST_SYM,$<,$@)
214 $(QUIET)$(MKDIR) -p $(@D)
215 $(QUIET)rm -rf $@
216 $(QUIET)$(LN_SYMLINK) $< $@
217
218$(PATH_BIN)/VBoxAddIF.sh: VBoxAddIF.sh $(VBOX_VERSION_STAMP)
219 $(call MSG_GENERATE,,$@,$<)
220 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" $< > $@
221 $(QUIET)chmod 0755 $@
222
223$(PATH_BIN)/VirtualBox.desktop: VirtualBox.desktop $(VBOX_VERSION_STAMP)
224 $(call MSG_GENERATE,,$@,$<)
225ifdef VBOX_PATH_PACKAGE_DOCS
226 $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+$(VBOX_PATH_PACKAGE_DOCS)+" $< > $@
227else
228 $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+/opt/VirtualBox-$(VBOX_VERSION_STRING)+" $< > $@
229endif
230
231# Note: The -m <mode> feature of kmk_builtin_install does not work together with fakeroot!
232# Note: $(INSTALL) -s is currently not reliable when used in parallel builds. Fixed in 0.1.1.
233$(foreach f,$(LINUXSTRIPBIN),$(PATH_TARGET)/archive/$(f)): \
234 $(PATH_TARGET)/archive/% : $(PATH_BIN)/% | $(call DIRDEP,$(PATH_TARGET)/archive)
235 $(call MSG_INST_FILE,$<,$@)
236 $(QUIET)install -D -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
237
238$(foreach f,$(LINUXSTRIPOBJ),$(PATH_TARGET)/archive/$(f)): \
239 $(PATH_TARGET)/archive/% : $(PATH_BIN)/% | $(call DIRDEP,$(PATH_TARGET)/archive)
240 $(call MSG_INST_FILE,$<,$@)
241 $(QUIET)$(if $(VBOX_DO_STRIP),objcopy --strip-unneeded -R .comment $< $@,cp $< $@)
242
243$(foreach f,$(LINUXNOSTRIP),$(PATH_TARGET)/archive/$(f)): \
244 $(PATH_TARGET)/archive/% : $(PATH_BIN)/% | $(call DIRDEP,$(PATH_TARGET)/archive)
245 $(call MSG_INST_SYM,$<,$@)
246 $(QUIET)$(RM) -f $@
247 $(QUIET)$(MKDIR) -p $(@D)
248 $(QUIET)$(LN_SYMLINK) $< $@
249
250$(foreach d,archive install,$(PATH_TARGET)/$(d)/):
251 $(QUIET)$(MKDIR) -p $@
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