Makefile.kmk revision 057f39e5b5ec1f959dded851f429863efad40c9d
# $Id$
## @file
# Sub-Makefile for the stub installer.
#
#
# Copyright (C) 2009-2012 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
SUB_DEPTH = ../../../../..
include $(KBUILD_PATH)/subheader.kmk
# This has to be 32-bit, so don't include it in the 64-bit build.
if "$(KBUILD_TARGET_ARCH)" == "x86"
TEMPLATE_VBOXSTUB = Drop the signing, we will sign it later.
TEMPLATE_VBOXSTUB_EXTENDS = VBOXR3STATIC
TEMPLATE_VBOXSTUB_POST_CMDS = $(NO_SUCH_VARIABLE)
PROGRAMS += VBoxStub
VBoxStub_TEMPLATE= VBOXSTUB
VBoxStub_DEFS = _WIN32_WINNT=0x0501 IN_RT_R3
VBoxStub_SOURCES = \
VBoxStub_SDKS += \
VBOX_NTDLL
VBoxStub_LIBS = \
$(VBOX_LIB_RUNTIME_STATIC) \
$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Msi.lib
VBoxStub_LDFLAGS = /IntegrityCheck:NO
VBoxStub.cpp_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
VBoxStub.cpp_DEPS = $(VBOX_SVN_REV_KMK)
# If signing mode is enabled, then add the possibility to
# install public certificate automatically in /silent mode
ifdef VBOX_SIGNING_MODE
VBoxStub_SOURCES += VBoxStubCertUtil.cpp
VBoxStub_LIBS += crypt32.lib
VBoxStub.cpp_DEPS += $(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h
VBoxStub.cpp_INCS += $(VBoxStub_0_OUTDIR)
VBoxStub.cpp_DEFS += VBOX_WITH_CODE_SIGNING
$$(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h: $(VBOX_BIN2C) $(PATH_ROOT)/src/VBox/Additions/WINNT/tools/oracle-vbox.cer | $$(dir $$@)
$(VBOX_BIN2C) _VBoxStubPublicCert $(PATH_ROOT)/src/VBox/Additions/WINNT/tools/oracle-vbox.cer $@
endif
# The icon location is configurable.
VBoxStub.rc_INCS += $(VBoxStub_0_OUTDIR)
VBoxStub.rc_DEPS += \
$(VBoxStub_0_OUTDIR)/VBoxStub-icon.rc \
$(VBoxStub_0_OUTDIR)/VBoxStub-manifest.rc
$(VBoxStub_0_OUTDIR)/VBoxStub-icon.rc \
$(VBoxStub_0_OUTDIR)/VBoxStub-manifest.rc
# Icon include file.
$$(VBoxStub_0_OUTDIR)/VBoxStub-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $(MAKEFILE_CURRENT) | $$(dir $$@)
$(APPEND) -t $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"'
# Manifest.
VBOX_STUB_MANIFEST_FILE := $(PATH_SUB_CURRENT)/VBoxStub.manifest
$$(VBoxStub_0_OUTDIR)/VBoxStub-manifest.rc: $(VBOX_STUB_MANIFEST_FILE) $(MAKEFILE_CURRENT) | $$(dir $$@)
$(APPEND) -t $@ 'APP_MANIFEST RT_MANIFEST "$(subst /,\\,$(VBOX_STUB_MANIFEST_FILE))"'
endif # x86 only
include $(FILE_KBUILD_SUB_FOOTER)