NTMakefile revision 1.1.1.1.12.1 1 ########################################################################
2 #
3 # Copyright (c) 2009 - 2016, 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 #
31
32 RELDIR=lib\krb5
33
34 !include ../../windows/NTMakefile.w32
35
36 libkrb5_OBJS = \
37 $(OBJ)\acache.obj \
38 $(OBJ)\acl.obj \
39 $(OBJ)\add_et_list.obj \
40 $(OBJ)\addr_families.obj \
41 $(OBJ)\aname_to_localname.obj \
42 $(OBJ)\appdefault.obj \
43 $(OBJ)\asn1_glue.obj \
44 $(OBJ)\auth_context.obj \
45 $(OBJ)\build_ap_req.obj \
46 $(OBJ)\build_auth.obj \
47 $(OBJ)\cache.obj \
48 $(OBJ)\changepw.obj \
49 $(OBJ)\codec.obj \
50 $(OBJ)\config_file.obj \
51 $(OBJ)\config_reg.obj \
52 $(OBJ)\constants.obj \
53 $(OBJ)\context.obj \
54 $(OBJ)\convert_creds.obj \
55 $(OBJ)\copy_host_realm.obj \
56 $(OBJ)\crc.obj \
57 $(OBJ)\creds.obj \
58 $(OBJ)\crypto.obj \
59 $(OBJ)\crypto-aes-sha1.obj \
60 $(OBJ)\crypto-aes-sha2.obj \
61 $(OBJ)\crypto-algs.obj \
62 $(OBJ)\crypto-arcfour.obj \
63 $(OBJ)\crypto-des-common.obj \
64 $(OBJ)\crypto-des.obj \
65 $(OBJ)\crypto-des3.obj \
66 $(OBJ)\crypto-evp.obj \
67 $(OBJ)\crypto-null.obj \
68 $(OBJ)\crypto-pk.obj \
69 $(OBJ)\crypto-rand.obj \
70 $(OBJ)\data.obj \
71 $(OBJ)\dcache.obj \
72 $(OBJ)\db_plugin.obj \
73 $(OBJ)\deprecated.obj \
74 $(OBJ)\digest.obj \
75 $(OBJ)\dll.obj \
76 $(OBJ)\eai_to_heim_errno.obj \
77 $(OBJ)\enomem.obj \
78 $(OBJ)\error_string.obj \
79 $(OBJ)\expand_hostname.obj \
80 $(OBJ)\expand_path.obj \
81 $(OBJ)\fast.obj \
82 $(OBJ)\fcache.obj \
83 $(OBJ)\free.obj \
84 $(OBJ)\free_host_realm.obj \
85 $(OBJ)\generate_seq_number.obj \
86 $(OBJ)\generate_subkey.obj \
87 $(OBJ)\get_addrs.obj \
88 $(OBJ)\get_cred.obj \
89 $(OBJ)\get_default_principal.obj \
90 $(OBJ)\get_default_realm.obj \
91 $(OBJ)\get_for_creds.obj \
92 $(OBJ)\get_host_realm.obj \
93 $(OBJ)\get_in_tkt.obj \
94 $(OBJ)\get_port.obj \
95 $(OBJ)\init_creds.obj \
96 $(OBJ)\init_creds_pw.obj \
97 $(OBJ)\kcm.obj \
98 $(OBJ)\keyblock.obj \
99 $(OBJ)\keytab.obj \
100 $(OBJ)\keytab_any.obj \
101 $(OBJ)\keytab_file.obj \
102 $(OBJ)\keytab_keyfile.obj \
103 $(OBJ)\keytab_memory.obj \
104 $(OBJ)\krbhst.obj \
105 $(OBJ)\kuserok.obj \
106 $(OBJ)\log.obj \
107 $(OBJ)\mcache.obj \
108 $(OBJ)\misc.obj \
109 $(OBJ)\mit_glue.obj \
110 $(OBJ)\mk_error.obj \
111 $(OBJ)\mk_priv.obj \
112 $(OBJ)\mk_rep.obj \
113 $(OBJ)\mk_req.obj \
114 $(OBJ)\mk_req_ext.obj \
115 $(OBJ)\mk_safe.obj \
116 $(OBJ)\net_read.obj \
117 $(OBJ)\net_write.obj \
118 $(OBJ)\n-fold.obj \
119 $(OBJ)\pac.obj \
120 $(OBJ)\padata.obj \
121 $(OBJ)\pcache.obj \
122 $(OBJ)\pkinit.obj \
123 $(OBJ)\pkinit-ec.obj \
124 $(OBJ)\plugin.obj \
125 $(OBJ)\principal.obj \
126 $(OBJ)\prog_setup.obj \
127 $(OBJ)\prompter_posix.obj \
128 $(OBJ)\rd_cred.obj \
129 $(OBJ)\rd_error.obj \
130 $(OBJ)\rd_priv.obj \
131 $(OBJ)\rd_rep.obj \
132 $(OBJ)\rd_req.obj \
133 $(OBJ)\rd_safe.obj \
134 $(OBJ)\read_message.obj \
135 $(OBJ)\recvauth.obj \
136 $(OBJ)\replay.obj \
137 $(OBJ)\salt-aes-sha1.obj \
138 $(OBJ)\salt-aes-sha2.obj \
139 $(OBJ)\salt-arcfour.obj \
140 $(OBJ)\salt-des.obj \
141 $(OBJ)\salt-des3.obj \
142 $(OBJ)\salt.obj \
143 $(OBJ)\scache.obj \
144 $(OBJ)\send_to_kdc.obj \
145 $(OBJ)\sendauth.obj \
146 $(OBJ)\set_default_realm.obj \
147 $(OBJ)\sock_principal.obj \
148 $(OBJ)\sp800-108-kdf.obj \
149 $(OBJ)\store.obj \
150 $(OBJ)\store-int.obj \
151 $(OBJ)\store_emem.obj \
152 $(OBJ)\store_fd.obj \
153 $(OBJ)\store_mem.obj \
154 $(OBJ)\store_sock.obj \
155 $(OBJ)\ticket.obj \
156 $(OBJ)\time.obj \
157 $(OBJ)\transited.obj \
158 $(OBJ)\verify_init.obj \
159 $(OBJ)\verify_user.obj \
160 $(OBJ)\version.obj \
161 $(OBJ)\warn.obj \
162 $(OBJ)\write_message.obj
163
164 libkrb5_gen_OBJS= \
165 $(OBJ)\krb5_err.obj \
166 $(OBJ)\krb_err.obj \
167 $(OBJ)\heim_err.obj \
168 $(OBJ)\k524_err.obj
169
170 INCFILES= \
171 $(INCDIR)\heim_err.h \
172 $(INCDIR)\k524_err.h \
173 $(INCDIR)\kcm.h \
174 $(INCDIR)\krb_err.h \
175 $(INCDIR)\krb5.h \
176 $(INCDIR)\krb5_ccapi.h \
177 $(INCDIR)\krb5_err.h \
178 $(INCDIR)\krb5_locl.h \
179 $(INCDIR)\krb5-protos.h \
180 $(INCDIR)\krb5-private.h \
181 $(INCDIR)\krb5-v4compat.h \
182 $(INCDIR)\crypto.h
183
184 all:: $(INCFILES)
185
186 clean::
187 -$(RM) $(INCFILES)
188
189 dist_libkrb5_la_SOURCES = \
190 acache.c \
191 acl.c \
192 add_et_list.c \
193 addr_families.c \
194 aname_to_localname.c \
195 appdefault.c \
196 asn1_glue.c \
197 auth_context.c \
198 build_ap_req.c \
199 build_auth.c \
200 cache.c \
201 changepw.c \
202 codec.c \
203 config_file.c \
204 config_reg.c \
205 constants.c \
206 context.c \
207 copy_host_realm.c \
208 crc.c \
209 creds.c \
210 crypto.c \
211 crypto.h \
212 crypto-aes-sha1.c \
213 crypto-aes-sha2.c \
214 crypto-algs.c \
215 crypto-arcfour.c \
216 crypto-des.c \
217 crypto-des-common.c \
218 crypto-des3.c \
219 crypto-evp.c \
220 crypto-pk.c \
221 crypto-rand.c \
222 db_plugin.c \
223 doxygen.c \
224 data.c \
225 dcache.c \
226 deprecated.c \
227 digest.c \
228 eai_to_heim_errno.c \
229 enomem.c \
230 error_string.c \
231 expand_hostname.c \
232 expand_path.c \
233 fast.c \
234 fcache.c \
235 free.c \
236 free_host_realm.c \
237 generate_seq_number.c \
238 generate_subkey.c \
239 get_addrs.c \
240 get_cred.c \
241 get_default_principal.c \
242 get_default_realm.c \
243 get_for_creds.c \
244 get_host_realm.c \
245 get_in_tkt.c \
246 get_port.c \
247 init_creds.c \
248 init_creds_pw.c \
249 kcm.c \
250 kcm.h \
251 keyblock.c \
252 keytab.c \
253 keytab_any.c \
254 keytab_file.c \
255 keytab_keyfile.c \
256 keytab_memory.c \
257 krb5_locl.h \
258 krb5-v4compat.h \
259 krbhst.c \
260 kuserok.c \
261 log.c \
262 mcache.c \
263 misc.c \
264 mk_error.c \
265 mk_priv.c \
266 mk_rep.c \
267 mk_req.c \
268 mk_req_ext.c \
269 mk_safe.c \
270 mit_glue.c \
271 net_read.c \
272 net_write.c \
273 n-fold.c \
274 pac.c \
275 padata.c \
276 pkinit.c \
277 pkinit-ec.c \
278 plugin.c \
279 principal.c \
280 prog_setup.c \
281 prompter_posix.c \
282 rd_cred.c \
283 rd_error.c \
284 rd_priv.c \
285 rd_rep.c \
286 rd_req.c \
287 rd_safe.c \
288 read_message.c \
289 recvauth.c \
290 replay.c \
291 salt.c \
292 salt-aes-sha1.c \
293 salt-aes-sha2.c \
294 salt-arcfour.c \
295 salt-des.c \
296 salt-des3.c \
297 scache.c \
298 send_to_kdc.c \
299 sendauth.c \
300 set_default_realm.c \
301 sock_principal.c \
302 sp800-108-kdf.c \
303 store.c \
304 store-int.c \
305 store-int.h \
306 store_emem.c \
307 store_fd.c \
308 store_mem.c \
309 store_sock.c \
310 pcache.c \
311 plugin.c \
312 ticket.c \
313 time.c \
314 transited.c \
315 verify_init.c \
316 verify_user.c \
317 version.c \
318 warn.c \
319 write_message.c
320
321 $(OBJ)\krb5-protos.h: $(dist_libkrb5_la_SOURCES)
322 $(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
323
324 $(OBJ)\krb5-private.h: $(dist_libkrb5_la_SOURCES)
325 $(PERL) ..\..\cf\make-proto.pl -q -P remove -p $(OBJ)\krb5-private.h $(dist_libkrb5_la_SOURCES) || $(RM) -f $(OBJ)\krb5-private.h
326
327 $(OBJ)\krb5_err.c $(OBJ)\krb5_err.h: krb5_err.et
328 cd $(OBJ)
329 $(BINDIR)\compile_et.exe $(SRCDIR)\krb5_err.et
330 cd $(SRCDIR)
331
332 $(OBJ)\krb_err.c $(OBJ)\krb_err.h: krb_err.et
333 cd $(OBJ)
334 $(BINDIR)\compile_et.exe $(SRCDIR)\krb_err.et
335 cd $(SRCDIR)
336
337 $(OBJ)\heim_err.c $(OBJ)\heim_err.h: heim_err.et
338 cd $(OBJ)
339 $(BINDIR)\compile_et.exe $(SRCDIR)\heim_err.et
340 cd $(SRCDIR)
341
342 $(OBJ)\k524_err.c $(OBJ)\k524_err.h: k524_err.et
343 cd $(OBJ)
344 $(BINDIR)\compile_et.exe $(SRCDIR)\k524_err.et
345 cd $(SRCDIR)
346
347 #----------------------------------------------------------------------
348 # libkrb5
349
350 $(LIBKRB5): $(libkrb5_OBJS) $(libkrb5_gen_OBJS)
351 $(LIBCON_C) -OUT:$@ $(LIBHEIMBASE) $(LIB_openssl_crypto) @<<
352 $(libkrb5_OBJS: =
353 )
354 $(libkrb5_gen_OBJS: =
355 )
356 <<
357
358 all:: $(LIBKRB5)
359
360 clean::
361 -$(RM) $(LIBKRB5)
362
363 $(OBJ)\libkrb5-exports.def: libkrb5-exports.def.in $(INCDIR)\config.h
364 $(CPREPROCESSOUT) libkrb5-exports.def.in > $@ || $(RM) $@
365
366 all:: $(OBJ)\libkrb5-exports.def
367
368 clean::
369 -$(RM) $(OBJ)\libkrb5-exports.def
370
371 #----------------------------------------------------------------------
372 # librfc3961
373
374 librfc3961_OBJS=\
375 $(OBJ)\crc.obj \
376 $(OBJ)\crypto.obj \
377 $(OBJ)\crypto-aes-sha1.obj \
378 $(OBJ)\crypto-aes-sha2.obj \
379 $(OBJ)\crypto-algs.obj \
380 $(OBJ)\crypto-arcfour.obj \
381 $(OBJ)\crypto-des.obj \
382 $(OBJ)\crypto-des-common.obj \
383 $(OBJ)\crypto-des3.obj \
384 $(OBJ)\crypto-evp.obj \
385 $(OBJ)\crypto-null.obj \
386 $(OBJ)\crypto-pk.obj \
387 $(OBJ)\crypto-rand.obj \
388 $(OBJ)\crypto-stubs.obj \
389 $(OBJ)\data.obj \
390 $(OBJ)\error_string.obj \
391 $(OBJ)\keyblock.obj \
392 $(OBJ)\n-fold.obj \
393 $(OBJ)\salt.obj \
394 $(OBJ)\salt-aes-sha1.obj \
395 $(OBJ)\salt-aes-sha2.obj \
396 $(OBJ)\salt-arcfour.obj \
397 $(OBJ)\salt-des.obj \
398 $(OBJ)\salt-des3.obj \
399 $(OBJ)\sp800-108-kdf.obj \
400 $(OBJ)\store-int.obj \
401 $(OBJ)\warn.obj
402
403 $(LIBRFC3961): $(librfc3961_OBJS)
404 $(LIBCON)
405
406 all:: $(LIBRFC3961)
407
408 clean::
409 -$(RM) $(LIBRFC3961)
410
411 #----------------------------------------------------------------------
412 # Tools
413
414 all-tools:: $(BINDIR)\verify_krb5_conf.exe
415
416 clean::
417 -$(RM) $(BINDIR)\verify_krb5_conf.*
418
419 $(BINDIR)\verify_krb5_conf.exe: $(OBJ)\verify_krb5_conf.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(OBJ)\verify_krb5_conf-version.res
420 $(EXECONLINK)
421 $(EXEPREP)
422
423 {}.c{$(OBJ)}.obj::
424 $(C2OBJ_P) -DBUILD_KRB5_LIB -DASN1_LIB
425
426 {$(OBJ)}.c{$(OBJ)}.obj::
427 $(C2OBJ_P) -DBUILD_KRB5_LIB -DASN1_LIB
428
429 #----------------------------------------------------------------------
430 # Tests
431
432 test:: test-binaries test-files test-run
433
434 test_binaries = \
435 $(OBJ)\aes-test.exe \
436 $(OBJ)\derived-key-test.exe \
437 $(OBJ)\krbhst-test.exe \
438 $(OBJ)\n-fold-test.exe \
439 $(OBJ)\parse-name-test.exe \
440 $(OBJ)\pseudo-random-test.exe \
441 $(OBJ)\store-test.exe \
442 $(OBJ)\string-to-key-test.exe \
443 $(OBJ)\test_acl.exe \
444 $(OBJ)\test_addr.exe \
445 $(OBJ)\test_alname.exe \
446 $(OBJ)\test_cc.exe \
447 $(OBJ)\test_config.exe \
448 $(OBJ)\test_crypto.exe \
449 $(OBJ)\test_crypto_wrapping.exe \
450 $(OBJ)\test_forward.exe \
451 $(OBJ)\test_get_addrs.exe \
452 $(OBJ)\test_hostname.exe \
453 $(OBJ)\test_keytab.exe \
454 $(OBJ)\test_kuserok.exe \
455 $(OBJ)\test_mem.exe \
456 $(OBJ)\test_pac.exe \
457 $(OBJ)\test_pkinit_dh2key.exe \
458 $(OBJ)\test_pknistkdf.exe \
459 $(OBJ)\test_plugin.exe \
460 $(OBJ)\test_prf.exe \
461 $(OBJ)\test_princ.exe \
462 $(OBJ)\test_renew.exe \
463 $(OBJ)\test_store.exe \
464 $(OBJ)\test_time.exe \
465
466 test-binaries: $(test_binaries) $(OBJ)\test_rfc3961.exe
467
468 test-files: $(OBJ)\test_config_strings.out
469
470 $(OBJ)\test_config_strings.out: test_config_strings.cfg
471 $(CP) $** $@
472
473 test-run:
474 cd $(OBJ)
475 -aes-test.exe
476 -derived-key-test.exe
477 -krbhst-test.exe
478 -n-fold-test.exe
479 -parse-name-test.exe
480 -pseudo-random-test.exe
481 -store-test.exe
482 -string-to-key-test.exe
483 -test_acl.exe
484 -test_addr.exe
485 # Skip alname due to lack of .k5login and "root"
486 # -test_alname.exe
487 -test_cc.exe
488 -test_config.exe
489 -test_crypto.exe
490 -test_crypto_wrapping.exe
491 # Skip forward due to need for existing hostname
492 # -test_forward.exe
493 -test_get_addrs.exe
494 -test_hostname.exe
495 -test_keytab.exe
496 # Skip kuserok requires principal and localname
497 # -test_kuserok.exe
498 -test_mem.exe
499 -test_pac.exe
500 -test_pkinit_dh2key.exe
501 -test_pknistkdf.exe
502 -test_plugin.exe
503 -test_prf.exe
504 -test_renew.exe
505 -test_rfc3961.exe
506 -test_store.exe
507 -test_time.exe
508 cd $(SRCDIR)
509
510 $(test_binaries): $$(@R).obj $(LIBHEIMDAL) $(LIBVERS) $(LIBROKEN) $(LIBHEIMBASE)
511 $(EXECONLINK)
512 $(EXEPREP_NODIST)
513
514 $(OBJ)\test_rfc3961.exe: $(OBJ)\test_rfc3961.obj $(LIBRFC3961) $(LIBHEIMDAL) $(LIBVERS) $(LIBCOMERR) $(LIBROKEN) $(LIBHEIMBASE)
515 $(EXECONLINK)
516 $(EXEPREP_NODIST)
517
518 $(test_binaries:.exe=.obj): $$(@B).c
519 $(C2OBJ_C) -Fo$@ -Fd$(@D)\ $** -DBlah
520
521 test-exports:
522 $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libkrb5-exports.def.in
523
524 test:: test-exports
525