1 ########################################################################
3 # Copyright (c) 2009, Secure Endpoints Inc.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # - Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
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
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.
32 RELDIR=packages\windows\kfw_shim
34 !include ../../../windows/NTMakefile.w32
38 $(BINDIR)\comerr32.dll \
39 $(BINDIR)\gssapi32.dll \
40 $(BINDIR)\krb5_32.dll \
41 # $(BINDIR)\krbcc32.dll \
42 # $(BINDIR)\wshelp32.dll \
43 # $(BINDIR)\xpprof32.dll
45 !elseif "$(CPU)"=="AMD64"
47 $(BINDIR)\comerr64.dll \
48 $(BINDIR)\gssapi64.dll \
49 $(BINDIR)\krb5_64.dll \
50 # $(BINDIR)\krbcc64.dll \
51 # $(BINDIR)\wshelp64.dll \
52 # $(BINDIR)\xpprof64.dll
55 ! error Unknown CPU value
58 GENDEF=$(PERL) $(SRC)\cf\w32-def-from-dll.pl
60 # ----------------------------------------------------------------------
63 COMERR_SHIM_OBJS=$(OBJ)\comerr_shim.obj
65 $(BINDIR)\comerr32.dll: $(COMERR_SHIM_OBJS)
66 $(DLLGUILINK) -out:$@ -def:comerr32.def $(LIBCOMERR)
67 ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@
69 # ----------------------------------------------------------------------
72 $(BINDIR)\comerr64.dll: $(COMERR_SHIM_OBJS)
73 $(DLLGUILINK) -out:$@ -def:comerr64.def $(LIBCOMERR)
74 ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@
76 # ----------------------------------------------------------------------
79 GSSAPI_SHIM_OBJS=$(OBJ)\gssapi_shim.obj
81 $(BINDIR)\gssapi32.dll: $(GSSAPI_SHIM_OBJS)
82 $(DLLGUILINK) -out:$@ -def:gssapi32.def $(LIBGSSAPI)
83 ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@
85 # ----------------------------------------------------------------------
88 $(BINDIR)\gssapi64.dll: $(GSSAPI_SHIM_OBJS)
89 $(DLLGUILINK) -out:$@ -def:gssapi64.def $(LIBGSSAPI)
90 ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@
92 # ----------------------------------------------------------------------
95 KRB5_SHIM_OBJS=$(OBJ)\krb5_shim.obj
97 $(BINDIR)\krb5_32.dll: $(KRB5_SHIM_OBJS)
98 $(DLLGUILINK) -out:$@ -def:krb5_32.def $(LIBHEIMDAL)
99 ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@
101 # ----------------------------------------------------------------------
104 $(BINDIR)\krb5_64.dll: $(KRB5_SHIM_OBJS)
105 $(DLLGUILINK) -out:$@ -def:krb5_64.def $(LIBHEIMDAL)
106 ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@
115 comerr32.def: $(COMERR_SHIM_OBJS)
116 ( $(GENDEF) -mcom_err -e$(BINDIR)\com_err.dll $** "$(KFWBIN)\comerr32.dll" > $@ ) || $(RM) $@
118 comerr64.def: $(COMERR_SHIM_OBJS)
119 ( $(GENDEF) -mcom_err -e$(BINDIR)\com_err.dll $** "$(KFWBIN)\comerr64.dll" > $@ ) || $(RM) $@
121 gssapi32.def: $(GSSAPI_SHIM_OBJS)
122 ( $(GENDEF) -mgssapi -e$(BINDIR)\gssapi.dll $** "$(KFWBIN)\gssapi32.dll" > $@ ) || $(RM) $@
124 gssapi64.def: $(GSSAPI_SHIM_OBJS)
125 ( $(GENDEF) -mgssapi -e$(BINDIR)\gssapi.dll $** "$(KFWBIN)\gssapi64.dll" > $@ ) || $(RM) $@
127 krb5_32.def: $(KRB5_SHIM_OBJS)
128 ( $(GENDEF) -mheimdal -e$(BINDIR)\heimdal.dll $** "$(KFWBIN)\krb5_32.dll" > $@ ) || $(RM) $@
130 krb5_64.def: $(KRB5_SHIM_OBJS)
131 ( $(GENDEF) -mheimdal -e$(BINDIR)\heimdal.dll $** "$(KFWBIN)\krb5_64.dll" > $@ ) || $(RM) $@
135 echo KFWBIN should point to the directory that contains the KfW binaries
139 gen-defs: comerr32.def gssapi32.def krb5_32.def
141 !elseif "$(CPU)"=="AMD64"
142 gen-defs: comerr64.def gssapi64.def krb5_64.def