1 ########################################################################
3 # Copyright (c) 2009 - 2017, 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.
34 intcflags=-I$(SRCDIR) -I$(SRCDIR)\..\com_err -I$(SRCDIR)\..\base
36 !include ../../windows/NTMakefile.w32
41 $(OBJ)\add_et_list.obj \
42 $(OBJ)\addr_families.obj \
43 $(OBJ)\aname_to_localname.obj \
44 $(OBJ)\appdefault.obj \
45 $(OBJ)\asn1_glue.obj \
46 $(OBJ)\auth_context.obj \
48 $(OBJ)\build_ap_req.obj \
49 $(OBJ)\build_auth.obj \
53 $(OBJ)\config_file.obj \
54 $(OBJ)\constants.obj \
56 $(OBJ)\convert_creds.obj \
57 $(OBJ)\copy_host_realm.obj \
61 $(OBJ)\crypto-aes-sha1.obj \
62 $(OBJ)\crypto-aes-sha2.obj \
63 $(OBJ)\crypto-algs.obj \
64 $(OBJ)\crypto-arcfour.obj \
65 $(OBJ)\crypto-des-common.obj \
66 $(OBJ)\crypto-des.obj \
67 $(OBJ)\crypto-des3.obj \
68 $(OBJ)\crypto-evp.obj \
69 $(OBJ)\crypto-null.obj \
70 $(OBJ)\crypto-pk.obj \
71 $(OBJ)\crypto-rand.obj \
74 $(OBJ)\db_plugin.obj \
75 $(OBJ)\deprecated.obj \
78 $(OBJ)\eai_to_heim_errno.obj \
80 $(OBJ)\error_string.obj \
81 $(OBJ)\expand_hostname.obj \
82 $(OBJ)\expand_path.obj \
86 $(OBJ)\free_host_realm.obj \
87 $(OBJ)\generate_seq_number.obj \
88 $(OBJ)\generate_subkey.obj \
89 $(OBJ)\get_addrs.obj \
91 $(OBJ)\get_default_principal.obj \
92 $(OBJ)\get_default_realm.obj \
93 $(OBJ)\get_for_creds.obj \
94 $(OBJ)\get_host_realm.obj \
95 $(OBJ)\get_in_tkt.obj \
97 $(OBJ)\init_creds.obj \
98 $(OBJ)\init_creds_pw.obj \
100 $(OBJ)\keyblock.obj \
102 $(OBJ)\keytab_any.obj \
103 $(OBJ)\keytab_file.obj \
104 $(OBJ)\keytab_keyfile.obj \
105 $(OBJ)\keytab_memory.obj \
112 $(OBJ)\mit_glue.obj \
114 $(OBJ)\mk_error.obj \
118 $(OBJ)\mk_req_ext.obj \
120 $(OBJ)\net_read.obj \
121 $(OBJ)\net_write.obj \
127 $(OBJ)\pkinit-ec.obj \
129 $(OBJ)\principal.obj \
130 $(OBJ)\prog_setup.obj \
131 $(OBJ)\prompter_posix.obj \
133 $(OBJ)\rd_error.obj \
138 $(OBJ)\read_message.obj \
139 $(OBJ)\recvauth.obj \
141 $(OBJ)\salt-aes-sha1.obj \
142 $(OBJ)\salt-aes-sha2.obj \
143 $(OBJ)\salt-arcfour.obj \
144 $(OBJ)\salt-des.obj \
145 $(OBJ)\salt-des3.obj \
148 $(OBJ)\send_to_kdc.obj \
149 $(OBJ)\sendauth.obj \
150 $(OBJ)\set_default_realm.obj \
151 $(OBJ)\sock_principal.obj \
152 $(OBJ)\sp800-108-kdf.obj \
154 $(OBJ)\store-int.obj \
155 $(OBJ)\store_emem.obj \
156 $(OBJ)\store_fd.obj \
157 $(OBJ)\store_mem.obj \
158 $(OBJ)\store_sock.obj \
159 $(OBJ)\store_stdio.obj \
162 $(OBJ)\transited.obj \
163 $(OBJ)\verify_init.obj \
164 $(OBJ)\verify_user.obj \
167 $(OBJ)\write_message.obj
170 $(OBJ)\krb5_err.obj \
172 $(OBJ)\k524_err.obj \
176 $(INCDIR)\k524_err.h \
177 $(INCDIR)\k5e1_err.h \
178 $(INCDIR)\kx509_err.h \
180 $(INCDIR)\krb_err.h \
182 $(INCDIR)\krb5_ccapi.h \
183 $(INCDIR)\krb5_err.h \
184 $(INCDIR)\krb5_locl.h \
185 $(INCDIR)\krb5-protos.h \
186 $(INCDIR)\krb5-private.h \
188 $(INCDIR)\an2ln_plugin.h \
189 $(INCDIR)\ccache_plugin.h \
190 $(INCDIR)\db_plugin.h \
191 $(INCDIR)\kuserok_plugin.h \
192 $(INCDIR)\locate_plugin.h \
193 $(INCDIR)\send_to_kdc_plugin.h
200 dist_libkrb5_la_SOURCES = \
205 aname_to_localname.c \
228 crypto-des-common.c \
239 eai_to_heim_errno.c \
248 generate_seq_number.c \
252 get_default_principal.c \
253 get_default_realm.c \
312 set_default_realm.c \
334 $(OBJ)\krb5-protos.h: $(dist_libkrb5_la_SOURCES)
335 $(PERL) ..\..\cf\make-proto.pl -E KRB5_LIB -q -P remove -o $(OBJ)\krb5-protos.h $(dist_libkrb5_la_SOURCES) || $(RM) -f $(OBJ)\krb5-protos.h
337 $(OBJ)\krb5-private.h: $(dist_libkrb5_la_SOURCES)
338 $(PERL) ..\..\cf\make-proto.pl -q -P remove -p $(OBJ)\krb5-private.h $(dist_libkrb5_la_SOURCES) || $(RM) -f $(OBJ)\krb5-private.h
340 $(OBJ)\krb5_err.c $(OBJ)\krb5_err.h: krb5_err.et
342 $(BINDIR)\compile_et.exe $(SRCDIR)\krb5_err.et
345 $(OBJ)\krb_err.c $(OBJ)\krb_err.h: krb_err.et
347 $(BINDIR)\compile_et.exe $(SRCDIR)\krb_err.et
350 $(OBJ)\k524_err.c $(OBJ)\k524_err.h: k524_err.et
352 $(BINDIR)\compile_et.exe $(SRCDIR)\k524_err.et
355 $(OBJ)\k5e1_err.c $(OBJ)\k5e1_err.h: k5e1_err.et
357 $(BINDIR)\compile_et.exe $(SRCDIR)\k5e1_err.et
360 $(OBJ)\kx509_err.c $(OBJ)\kx509_err.h: kx509_err.et
362 $(BINDIR)\compile_et.exe $(SRCDIR)\kx509_err.et
365 #----------------------------------------------------------------------
368 $(LIBKRB5): $(libkrb5_OBJS) $(libkrb5_gen_OBJS)
369 $(LIBCON_C) -OUT:$@ $(LIBHEIMBASE) $(LIB_openssl_crypto) @<<
372 $(libkrb5_gen_OBJS: =
381 $(OBJ)\libkrb5-exports.def: libkrb5-exports.def.in $(INCDIR)\config.h
382 $(CPREPROCESSOUT) libkrb5-exports.def.in > $@ || $(RM) $@
384 all:: $(OBJ)\libkrb5-exports.def
387 -$(RM) $(OBJ)\libkrb5-exports.def
389 #----------------------------------------------------------------------
395 $(OBJ)\crypto-aes-sha1.obj \
396 $(OBJ)\crypto-aes-sha2.obj \
397 $(OBJ)\crypto-algs.obj \
398 $(OBJ)\crypto-arcfour.obj \
399 $(OBJ)\crypto-des.obj \
400 $(OBJ)\crypto-des-common.obj \
401 $(OBJ)\crypto-des3.obj \
402 $(OBJ)\crypto-evp.obj \
403 $(OBJ)\crypto-null.obj \
404 $(OBJ)\crypto-pk.obj \
405 $(OBJ)\crypto-rand.obj \
406 $(OBJ)\crypto-stubs.obj \
408 $(OBJ)\error_string.obj \
409 $(OBJ)\keyblock.obj \
412 $(OBJ)\salt-aes-sha1.obj \
413 $(OBJ)\salt-aes-sha2.obj \
414 $(OBJ)\salt-arcfour.obj \
415 $(OBJ)\salt-des.obj \
416 $(OBJ)\salt-des3.obj \
417 $(OBJ)\sp800-108-kdf.obj \
418 $(OBJ)\store-int.obj \
421 $(LIBRFC3961): $(librfc3961_OBJS)
429 #----------------------------------------------------------------------
432 all-tools:: $(BINDIR)\verify_krb5_conf.exe
435 -$(RM) $(BINDIR)\verify_krb5_conf.*
437 $(BINDIR)\verify_krb5_conf.exe: $(OBJ)\verify_krb5_conf.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(OBJ)\verify_krb5_conf-version.res
442 $(C2OBJ_P) -DBUILD_KRB5_LIB -DASN1_LIB
444 {$(OBJ)}.c{$(OBJ)}.obj::
445 $(C2OBJ_P) -DBUILD_KRB5_LIB -DASN1_LIB
447 #----------------------------------------------------------------------
450 test:: test-binaries test-files test-run
453 $(OBJ)\aes-test.exe \
454 $(OBJ)\derived-key-test.exe \
455 $(OBJ)\krbhst-test.exe \
456 $(OBJ)\n-fold-test.exe \
457 $(OBJ)\parse-name-test.exe \
458 $(OBJ)\pseudo-random-test.exe \
459 $(OBJ)\store-test.exe \
460 $(OBJ)\string-to-key-test.exe \
461 $(OBJ)\test_acl.exe \
462 $(OBJ)\test_addr.exe \
463 $(OBJ)\test_alname.exe \
465 $(OBJ)\test_config.exe \
466 $(OBJ)\test_crypto.exe \
467 $(OBJ)\test_crypto_wrapping.exe \
468 $(OBJ)\test_forward.exe \
469 $(OBJ)\test_get_addrs.exe \
470 $(OBJ)\test_hostname.exe \
471 $(OBJ)\test_keytab.exe \
472 $(OBJ)\test_kuserok.exe \
473 $(OBJ)\test_mem.exe \
474 $(OBJ)\test_pac.exe \
475 $(OBJ)\test_pkinit_dh2key.exe \
476 $(OBJ)\test_pknistkdf.exe \
477 $(OBJ)\test_plugin.exe \
478 $(OBJ)\test_prf.exe \
479 $(OBJ)\test_princ.exe \
480 $(OBJ)\test_renew.exe \
481 $(OBJ)\test_store.exe \
482 $(OBJ)\test_time.exe \
484 test-binaries: $(test_binaries) $(OBJ)\test_rfc3961.exe
486 test-files: $(OBJ)\test_config_strings.out
488 $(OBJ)\test_config_strings.out: test_config_strings.cfg
494 -derived-key-test.exe
498 -pseudo-random-test.exe
500 -string-to-key-test.exe
503 # Skip alname due to lack of .k5login and "root"
508 -test_crypto_wrapping.exe
509 # Skip forward due to need for existing hostname
514 # Skip kuserok requires principal and localname
518 -test_pkinit_dh2key.exe
528 $(test_binaries): $$(@R).obj $(LIBHEIMDAL) $(LIBVERS) $(LIBROKEN) $(LIBHEIMBASE)
532 $(OBJ)\test_rfc3961.exe: $(OBJ)\test_rfc3961.obj $(LIBRFC3961) $(LIBHEIMDAL) $(LIBVERS) $(LIBCOMERR) $(LIBROKEN) $(LIBHEIMBASE)
536 $(test_binaries:.exe=.obj): $$(@B).c
537 $(C2OBJ_C) -Fo$@ -Fd$(@D)\ $** -DBlah
540 $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libkrb5-exports.def.in