VirtualBox

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

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

Installer (Linux): put the system information script in the mail VirtualBox directory

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