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