Files
heimdal/packages/windows/installer/NTMakefile
2010-11-24 15:33:10 -05:00

150 lines
4.1 KiB
Plaintext

########################################################################
#
# Copyright (c) 2010, Secure Endpoints Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
RELDIR=packages\windows\installer
!include ../../../windows/NTMakefile.w32
!ifdef BUILD_INSTALLERS
VERSIOND=$(VER_PRODUCT_MAJOR)-$(VER_PRODUCT_MINOR)-$(VER_PRODUCT_AUX)-$(VER_PRODUCT_PATCH)
VERSION=$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(VER_PRODUCT_AUX).$(VER_PRODUCT_PATCH)
POLPREFIX=policy.$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR)
!if "$(CPU)"=="AMD64"
PLATFORM=x64
!else
PLATFORM=x86
!endif
!if "$(BUILD)"=="rel"
DEBUGOPT=
!else
DEBUGOPT=-$(BUILD)
!endif
######################################################################
# Heimdal Merge Modules
MERGEMOD=$(INSTDIR)\Heimdal.msm
$(MERGEMOD): $(OBJ)\heimdal-assemblies.wixobj
$(LIGHT) -out $@ $**
$(OBJ)\heimdal-assemblies.wixobj: heimdal-assemblies.wxs
$(CANDLE) -arch $(PLATFORM) -o $@ $** \
-dVersion=$(VERSION) \
-dBinDir=$(BINDIR) \
-dPlatform=$(PLATFORM)
$(SDKREDISTDIR)\Heimdal.msm: $(MERGEMOD)
$(CP) $** $@
all:: $(MERGEMOD) $(SDKREDISTDIR)\Heimdal.msm
clean::
-$(RM) $(MERGEMOD)
######################################################################
# Runtime modules
VCVER=VC90
!if "$(CPU)"=="AMD64"
CPUSUFFIX=_x64
!else
CPUSUFFIX=
!endif
!if "$(BUILD)"=="rel"
CRTNAME=CRT
!else
CRTNAME=DebugCRT
!endif
MMDIR=$(ProgramFiles)\Common Files\Merge Modules
!if !exist($(MMDIR))
MMDIR=$(SystemDrive)\Program Files (x86)\Common Files\Merge Modules
!endif
!if exist("$(MMDIR)")
RUNTIMEMODULE="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x86$(CPUSUFFIX).msm"
!else
RUNTIMEMODULE="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.$(PLATFORM)_msm.msm"
!endif
######################################################################
# Heimdal installer
!if exist($(SRC)\thirdparty)
THIRDPARTYOBJS=$(INSTDIR)\apicache.wixobj $(INSTDIR)\lsacache.wixobj
THIRDPARTYOPT=-dApiCache=1 -dLsaCache=1
!endif
!ifdef MKSHIMDIR
THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(MKSHIMDIR)\out\dest_$(OUTDIR)\install\MKShim.wixlib
THIRDPARTYOPT=$(THIRDPARTYOPT) -dMKShim=1
!endif
INSTALLER=$(INSTDIR)\Heimdal-$(CPU)$(DEBUGOPT)-$(VERSIOND).msi
$(INSTALLER): $(OBJ)\heimdal-installer.wixobj $(MERGEMOD) $(THIRDPARTYOBJS) \
$(THIRDPARTYDEPS) lang\en-us.wxl
$(LIGHT) -out $@ $(OBJ)\heimdal-installer.wixobj $(THIRDPARTYOBJS) \
-sval -cultures:en-us -loc lang\en-us.wxl \
-dWixUILicenseRtf=lang\license-en-us.rtf \
-ext WixUIExtension
$(_CODESIGN)
$(OBJ)\heimdal-installer.wixobj: heimdal-installer.wxs
$(CANDLE) -arch $(PLATFORM) -o $@ $** \
-dVersion=$(VERSION) \
-dBinDir=$(BINDIR) \
-dDocDir=$(DOCDIR) \
-dInstDir=$(INSTDIR) \
-dSrcDir=$(SRC) \
-dPlatform=$(PLATFORM) \
-dRuntimeModule=$(RUNTIMEMODULE) \
-dPolPrefix=$(POLPREFIX) \
$(THIRDPARTYOPT)
all:: $(INSTALLER)
clean::
-$(RM) $(INSTALLER)
!endif # BUILD_INSTALLERS