etc/services - sync with NetBSD-8
[minix.git] / crypto / external / bsd / heimdal / dist / packages / windows / installer / NTMakefile
blob03c368b631f4976cbd0fcfd31caf6744985f2d37
1 ########################################################################
3 # Copyright (c) 2010, Secure Endpoints Inc.
4 # All rights reserved.
5
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9
10 # - Redistributions of source code must retain the above copyright
11 #   notice, this list of conditions and the following disclaimer.
12
13 # - Redistributions in binary form must reproduce the above copyright
14 #   notice, this list of conditions and the following disclaimer in
15 #   the documentation and/or other materials provided with the
16 #   distribution.
17
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 # POSSIBILITY OF SUCH DAMAGE.
30
32 RELDIR=packages\windows\installer
34 !include ../../../windows/NTMakefile.w32
36 !ifdef BUILD_INSTALLERS
38 VERSIOND=$(VER_PRODUCT_MAJOR)-$(VER_PRODUCT_MINOR)-$(VER_PRODUCT_AUX)-$(VER_PRODUCT_PATCH)
39 VERSION=$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(VER_PRODUCT_AUX).$(VER_PRODUCT_PATCH)
40 POLPREFIX=policy.$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR)
42 !if "$(CPU)"=="AMD64"
43 PLATFORM=x64
44 !else
45 PLATFORM=x86
46 !endif
48 !if "$(BUILD)"=="rel"
49 DEBUGOPT=
50 !else
51 DEBUGOPT=-$(BUILD)
52 !endif
54 ######################################################################
55 # Heimdal Merge Modules
57 ASSEMBLYMODULE=$(INSTDIR)\Heimdal.msm
59 $(ASSEMBLYMODULE): $(OBJ)\heimdal-assemblies.wixobj
60         $(LIGHT) -out $@ $**
62 $(OBJ)\heimdal-assemblies.wixobj: heimdal-assemblies.wxs
63         $(CANDLE) -arch $(PLATFORM) -o $@ $**   \
64                 -dVersion=$(VERSION)            \
65                 -dBinDir=$(BINDIR)              \
66                 -dPlatform=$(PLATFORM)
68 $(SDKREDISTDIR)\Heimdal.msm: $(ASSEMBLYMODULE)
69         $(CP) $** $@
71 POLICYMODULE=$(INSTDIR)\Heimdal.Policy.msm
73 $(POLICYMODULE): $(OBJ)\heimdal-policy.wixobj
74         $(LIGHT) -out $@ $**
76 $(OBJ)\heimdal-policy.wixobj: heimdal-policy.wxs
77         $(CANDLE) -arch $(PLATFORM) -o $@ $**   \
78                 -dVersion=$(VERSION)            \
79                 -dBinDir=$(BINDIR)              \
80                 -dPlatform=$(PLATFORM)          \
81                 -dPolPrefix=$(POLPREFIX)
83 $(SDKREDISTDIR)\Heimdal.Policy.msm: $(POLICYMODULE)
84         $(CP) $** $@
86 all:: $(ASSEMBLYMODULE) $(SDKREDISTDIR)\Heimdal.msm
88 all:: $(POLICYMODULE) $(SDKREDISTDIR)\Heimdal.Policy.msm
90 clean::
91         -$(RM) $(ASSEMBLYMODULE)
92         -$(RM) $(POLICYMODULE)
93         -$(RM) $(SDKREDISTDIR)\Heimdal.msm
94         -$(RM) $(SDKREDISTDIR)\Heimdal.Policy.msm
96 ######################################################################
97 # Runtime modules
99 !if [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==15
100 VCVER=VC90
101 !elseif [ $(PERL) $(SRC)\cf\w32-detect-vc-version.pl $(CC) ]==14
102 VCVER=VC80
103 !else
104 !  error Cant determine Visual C compiler version
105 !endif
107 !if "$(BUILD)"=="rel"
108 CRTNAME=CRT
109 !else
110 CRTNAME=DebugCRT
111 !endif
113 !if "$(MMDIR)"==""
114 MMDIR=$(ProgramFiles)\Common Files\Merge Modules
115 !if !exist($(MMDIR))
116 MMDIR=$(SystemDrive)\Program Files (x86)\Common Files\Merge Modules
117 !endif
118 !endif
120 !if exist("$(MMDIR)")
122 RUNTIMEMODULE32="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x86.msm"
123 RUNTIMEMODULE64="$(MMDIR)\Microsoft_$(VCVER)_$(CRTNAME)_x86_x64.msm"
125 !else
127 RUNTIMEMODULE32="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.x86_msm.msm"
128 RUNTIMEMODULE64="$(MSSDK)\Redist\VC\microsoft.vcxx.crt.x64_msm.msm"
130 !endif
133 ######################################################################
134 # Heimdal installer
136 CANDLEOPTS=     \
137         -dVersion=$(VERSION)                    \
138         -dBinDir=$(BINDIR)                      \
139         -dDocDir=$(DOCDIR)                      \
140         -dSrcDir=$(SRC)                         \
141         -dPlatform=$(PLATFORM)                  \
142         -dPolPrefix=$(POLPREFIX)                \
144 !if "$(CPU)"=="AMD64"
146 INSTDIR32=$(INSTDIR:AMD64=i386)
148 CANDLEOPTS=$(CANDLEOPTS) -dTarget64     \
149         -dInstDir32=$(INSTDIR32)        \
150         -dInstDir64=$(INSTDIR)                  \
151         -dRuntimeModule32=$(RUNTIMEMODULE32)    \
152         -dRuntimeModule64=$(RUNTIMEMODULE64)    \
154 !ifdef MULTIPLATFORM_INSTALLER
155 CANDLEOPTS=$(CANDLEOPTS) -dTarget32
156 TYPEOPT=-full
157 !else
158 !  message Excluding 32-bit components from installer
159 TYPEOPT=
160 !endif
162 INSTDEPS=$(INSTDIR32)\Heimdal.msm \
163         $(INSTDIR32)\Heimdal.Policy.msm \
164         $(ASSEMBLYMODULE) $(POLICYMODULE)
166 !else
168 CANDLEOPTS=$(CANDLEOPTS) -dTarget32             \
169         -dInstDir32=$(INSTDIR)                  \
170         -dRuntimeModule32=$(RUNTIMEMODULE32)    \
172 !endif
174 !if exist($(SRC)\thirdparty)
175 THIRDPARTYOBJS=$(INSTDIR)\apicache.wixobj $(INSTDIR)\lsacache.wixobj
176 THIRDPARTYOPTS=-dApiCache=1 -dLsaCache=1
178 !if "$(CPU)"=="AMD64"
179 THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR32)\apicache.wixobj $(INSTDIR32)\lsacache.wixobj
180 !endif
181 !endif
183 !if exist($(SRC)\thirdparty\MKShim)
184 THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR)\MKShim.wixlib
185 THIRDPARTYOPTS=$(THIRDPARTYOPTS) -dMKShim=1
187 !if "$(CPU)"=="AMD64"
188 THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR32)\MKShim.wixlib
189 !endif
190 !endif
192 INSTALLER=$(INSTDIR)\Heimdal-$(CPU)$(DEBUGOPT)$(TYPEOPT)-$(VERSIOND).msi
193 WIXOBJ=$(OBJ)\heimdal-installer$(TYPEOPT).wixobj
195 $(INSTALLER): $(WIXOBJ) $(THIRDPARTYOBJS) $(INSTDEPS) lang\en-us.wxl
196         $(LIGHT) -out $@ $(WIXOBJ) $(THIRDPARTYOBJS)    \
197                 -sval -cultures:en-us -loc lang\en-us.wxl       \
198                 -dWixUILicenseRtf=lang\license-en-us.rtf        \
199                 -ext WixUIExtension
200         $(_CODESIGN)
202 $(WIXOBJ): heimdal-installer.wxs
203         $(CANDLE) -arch $(PLATFORM) -o $@ heimdal-installer.wxs \
204                 $(CANDLEOPTS) $(THIRDPARTYOPTS)
206 all:: $(INSTALLER)
208 clean::
209         -$(RM) $(INSTALLER)
211 !endif                          # BUILD_INSTALLERS