Fix KRB-FX-CF2 for enctypes with non-dense keyspaces
[heimdal.git] / lib / hx509 / NTMakefile
blob99116d76ed2679bdbfd47232a0979bf53f16cab8
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\hx509
33 intcflags=-I$(SRCDIR)\ref -I$(OBJ)
34 localcflags=-DASN1_LIB
36 !include ../../windows/NTMakefile.w32
38 gen_files_ocsp = $(OBJ)\asn1_ocsp_asn1.x
40 gen_files_pkcs10 = $(OBJ)\asn1_pkcs10_asn1.x
42 gen_files_crmf = $(OBJ)\asn1_crmf_asn1.x
44 libhx509_la_OBJS =                      \
45         $(OBJ)\ca.obj                   \
46         $(OBJ)\cert.obj                 \
47         $(OBJ)\cms.obj                  \
48         $(OBJ)\collector.obj            \
49         $(OBJ)\crypto.obj               \
50         $(OBJ)\error.obj                \
51         $(OBJ)\env.obj                  \
52         $(OBJ)\file.obj                 \
53         $(OBJ)\hx509_err.obj            \
54         $(OBJ)\sel.obj                  \
55         $(OBJ)\sel-gram.obj             \
56         $(OBJ)\sel-lex.obj              \
57         $(OBJ)\keyset.obj               \
58         $(OBJ)\ks_dir.obj               \
59         $(OBJ)\ks_file.obj              \
60         $(OBJ)\ks_mem.obj               \
61         $(OBJ)\ks_null.obj              \
62         $(OBJ)\ks_p11.obj               \
63         $(OBJ)\ks_p12.obj               \
64         $(OBJ)\ks_keychain.obj          \
65         $(OBJ)\lock.obj                 \
66         $(OBJ)\name.obj                 \
67         $(OBJ)\peer.obj                 \
68         $(OBJ)\print.obj                \
69         $(OBJ)\softp11.obj              \
70         $(OBJ)\req.obj                  \
71         $(OBJ)\revoke.obj               \
72         $(gen_files_ocsp:.x=.obj)       \
73         $(gen_files_pkcs10:.x=.obj)
75 $(LIBHX509): $(libhx509_la_OBJS)
76         $(LIBCON)
78 dist_libhx509_la_SOURCES =      \
79         $(SRCDIR)\ca.c          \
80         $(SRCDIR)\cert.c        \
81         $(SRCDIR)\cms.c         \
82         $(SRCDIR)\collector.c   \
83         $(SRCDIR)\crypto.c      \
84         $(SRCDIR)\doxygen.c     \
85         $(SRCDIR)\error.c       \
86         $(SRCDIR)\env.c         \
87         $(SRCDIR)\file.c        \
88         $(SRCDIR)\hx509.h       \
89         $(SRCDIR)\hx_locl.h     \
90         $(SRCDIR)\sel.c         \
91         $(SRCDIR)\sel.h         \
92         $(SRCDIR)\sel-gram.y    \
93         $(SRCDIR)\sel-lex.l     \
94         $(SRCDIR)\keyset.c      \
95         $(SRCDIR)\ks_dir.c      \
96         $(SRCDIR)\ks_file.c     \
97         $(SRCDIR)\ks_mem.c      \
98         $(SRCDIR)\ks_null.c     \
99         $(SRCDIR)\ks_p11.c      \
100         $(SRCDIR)\ks_p12.c      \
101         $(SRCDIR)\ks_keychain.c \
102         $(SRCDIR)\lock.c        \
103         $(SRCDIR)\name.c        \
104         $(SRCDIR)\peer.c        \
105         $(SRCDIR)\print.c       \
106         $(SRCDIR)\softp11.c     \
107         $(SRCDIR)\ref\pkcs11.h  \
108         $(SRCDIR)\req.c         \
109         $(SRCDIR)\revoke.c
111 asn1_compile=$(BINDIR)\asn1_compile.exe
113 $(gen_files_ocsp:.x=.c): $$(@R).x
115 $(gen_files_pkcs10:.x=.c): $$(@R).x
117 $(gen_files_crmf:.x=.c): $$(@R).x
119 $(gen_files_ocsp) $(OBJ)\ocsp_asn1.hx: $(asn1_compile) ocsp.asn1
120         cd $(OBJ)
121         $(asn1_compile) --one-code-file \
122                 --preserve-binary=OCSPTBSRequest \
123                 --preserve-binary=OCSPResponseData \
124                 $(SRCDIR)\ocsp.asn1 ocsp_asn1 \
125         || ( $(RM) -f $(gen_files_ocsp) $(OBJ)\ocsp_asn1.h ; exit /b 1 )
126         cd $(SRCDIR)
128 $(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.hx: $(asn1_compile) pkcs10.asn1
129         cd $(OBJ)
130         $(asn1_compile) --one-code-file \
131                 --preserve-binary=CertificationRequestInfo \
132                 $(SRCDIR)\pkcs10.asn1 pkcs10_asn1 \
133         || ( $(RM) -f $(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.h ; exit /b 1 )
134         cd $(SRCDIR)
136 $(gen_files_crmf) $(OBJ)\crmf_asn1.hx: $(asn1_compile) crmf.asn1
137         cd $(OBJ)
138         $(asn1_compile) --one-code-file $(SRCDIR)\crmf.asn1 crmf_asn1 \
139         || ( $(RM) -f $(gen_files_crmf) $(OBJ)\crmf_asn1.h ; exit /b 1 )
140         cd $(SRCDIR)
142 INCFILES=                           \
143         $(INCDIR)\hx509.h           \
144         $(INCDIR)\hx509-protos.h    \
145         $(INCDIR)\hx509-private.h   \
146         $(INCDIR)\hx509_err.h       \
147         $(INCDIR)\ocsp_asn1.h       \
148         $(INCDIR)\pkcs10_asn1.h     \
149         $(INCDIR)\crmf_asn1.h       \
150         $(OBJ)\ocsp_asn1-priv.h     \
151         $(OBJ)\pkcs10_asn1-priv.h   \
152         $(OBJ)\crmf_asn1-priv.h
154 hxtool.c: $(OBJ)\hxtool-commands.h
156 SLC=$(BINDIR)\slc.exe
158 $(OBJ)\hxtool-commands.c $(OBJ)\hxtool-commands.h: hxtool-commands.in $(SLC)
159         cd $(OBJ)
160         $(CP) $(SRCDIR)\hxtool-commands.in $(OBJ)\hxtool-commands.in
161         $(SLC) hxtool-commands.in
162         cd $(SRCDIR)
164 $(BINDIR)\hxtool.exe: $(OBJ)\tool\hxtool.obj $(OBJ)\tool\hxtool-commands.obj $(LIBHEIMDAL) $(OBJ)\hxtool-version.res
165         $(EXECONLINK) $(LIBHEIMDAL) $(LIBROKEN) $(LIBSL) $(LIBVERS) $(LIBCOMERR)
166         $(EXEPREP)
168 $(OBJ)\hx509-protos.h:
169         cd $(OBJ)
170         $(PERL) $(SRCDIR)\..\..\cf\make-proto.pl -R "^(_|^C)" -E HX509_LIB -q -P remove -o hx509-protos.h $(dist_libhx509_la_SOURCES) || $(RM) -f hx509-protos.h
171         cd $(SRCDIR)
173 $(OBJ)\hx509-private.h:
174         cd $(OBJ)
175         $(PERL) $(SRCDIR)\..\..\cf\make-proto.pl -q -P remove -p hx509-private.h $(dist_libhx509_la_SOURCES) || $(RM) -f hx509-private.h
176         cd $(SRCDIR)
178 $(OBJ)\hx509_err.c $(OBJ)\hx509_err.h: hx509_err.et
179         cd $(OBJ)
180         $(BINDIR)\compile_et.exe $(SRCDIR)\hx509_err.et
181         cd $(SRCDIR)
183 $(OBJ)\sel-gram.obj: $(OBJ)\sel-gram.c
184         $(C2OBJ) -I$(SRCDIR)
186 $(OBJ)\sel-lex.obj: $(OBJ)\sel-lex.c
187         $(C2OBJ) -I$(SRCDIR) -I$(OBJ) -DYY_NO_UNISTD_H
189 $(OBJ)\sel-gram.c: sel-gram.y
190         $(YACC) -o $@ --defines=$(OBJ)\sel-gram.h sel-gram.y
192 $(OBJ)\sel-lex.c: sel-lex.l
193         $(LEX) -o$@ sel-lex.l
195 all:: $(INCFILES) $(LIBHX509)
197 prep:: mktooldir
199 mktooldir:
200 !  if !exist($(OBJ)\tool)
201         $(MKDIR) $(OBJ)\tool
202 !  endif
204 all-tools:: $(BINDIR)\hxtool.exe
206 clean::
207         -$(RM) $(BINDIR)\hxtool.*
208         -$(RM) $(OBJ)\tool\*.*
210 {}.c{$(OBJ)\tool}.obj::
211         $(C2OBJ_C) /Fd$(OBJ)\tool\ /Fo$(OBJ)\tool\ $(MPOPT) /UASN1_LIB $<
213 {$(OBJ)}.c{$(OBJ)\tool}.obj::
214         $(C2OBJ_C) /Fd$(OBJ)\tool\ /Fo$(OBJ)\tool\ $(MPOPT) /UASN1_LIB $<