third_party/heimdal: Import lorikeet-heimdal-202307040259 (commit 33d117b8a9c11714ef7...
[Samba.git] / third_party / heimdal / lib / asn1 / Makefile.am
blobe5af4ba2048b1d6700ad7e5f9dc7e5c5c50348a6
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 WFLAGS += $(WFLAGS_ENUM_CONV)
7 AM_YFLAGS = -d -o asn1parse.c -t
9 AM_CPPFLAGS += $(ROKEN_RENAME) -I$(top_builddir)/include -I$(top_srcdir)/lib/base
11 man_MANS = asn1_print.1 asn1_compile.1
13 lib_LTLIBRARIES = libasn1.la libasn1template.la
14 libasn1_la_LDFLAGS = -version-info 8:0:0
15 libasn1template_la_LDFLAGS = -version-info 8:0:0
17 noinst_LTLIBRARIES = libasn1base.la
19 if versionscript
20 libasn1_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
21 libasn1template_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
22 endif
25 libasn1_la_LIBADD = \
26         libasn1base.la \
27         @LIB_com_err@ \
28         $(LIBADD_roken)
30 libasn1template_la_LIBADD = \
31         libasn1base.la \
32         @LIB_com_err@ \
33         $(LIBADD_roken)
35 BUILT_SOURCES =                 \
36         $(gen_files_rfc2459)    \
37         $(gen_files_rfc4108)    \
38         $(gen_files_cms)        \
39         $(gen_files_krb5)       \
40         $(gen_files_ocsp)       \
41         $(gen_files_pkinit)     \
42         $(gen_files_pkcs8)      \
43         $(gen_files_pkcs9)      \
44         $(gen_files_pkcs10)     \
45         $(gen_files_pkcs12)     \
46         $(gen_files_digest)     \
47         $(gen_files_kx509)
49 BUILT_TEMPLATE_SOURCES =                \
50         $(gen_files_rfc2459_template)   \
51         $(gen_files_rfc4108_template)   \
52         $(gen_files_cms_template)       \
53         $(gen_files_krb5_template)      \
54         $(gen_files_ocsp_template)      \
55         $(gen_files_pkinit_template)    \
56         $(gen_files_pkcs8_template)     \
57         $(gen_files_pkcs9_template)     \
58         $(gen_files_pkcs10_template)    \
59         $(gen_files_pkcs12_template)    \
60         $(gen_files_digest_template)    \
61         $(gen_files_kx509_template)
63 gen_files_krb5 = asn1_krb5_asn1.c
64 gen_files_krb5_template = asn1_krb5_template_asn1.c
65 gen_files_cms = asn1_cms_asn1.c
66 gen_files_cms_template = asn1_cms_template_asn1.c
67 gen_files_crmf = asn1_crmf_asn1.c
68 gen_files_crmf_template = asn1_crmf_template_asn1.c
69 gen_files_rfc2459 = asn1_rfc2459_asn1.c
70 gen_files_rfc2459_template = asn1_rfc2459_template_asn1.c
71 gen_files_rfc4108 = asn1_rfc4108_asn1.c
72 gen_files_rfc4108_template = asn1_rfc4108_template_asn1.c
73 gen_files_ocsp = asn1_ocsp_asn1.c
74 gen_files_ocsp_template = asn1_ocsp_template_asn1.c
75 gen_files_pkinit = asn1_pkinit_asn1.c
76 gen_files_pkinit_template = asn1_pkinit_template_asn1.c
77 gen_files_pkcs10 = asn1_pkcs10_asn1.c
78 gen_files_pkcs10_template = asn1_pkcs10_template_asn1.c
79 gen_files_pkcs12 = asn1_pkcs12_asn1.c
80 gen_files_pkcs12_template = asn1_pkcs12_template_asn1.c
81 gen_files_pkcs8 = asn1_pkcs8_asn1.c
82 gen_files_pkcs8_template = asn1_pkcs8_template_asn1.c
83 gen_files_pkcs9 = asn1_pkcs9_asn1.c
84 gen_files_pkcs9_template = asn1_pkcs9_template_asn1.c
85 gen_files_test = asn1_test_asn1.c
86 gen_files_test_template = asn1_test_template_asn1.c
87 gen_files_digest = asn1_digest_asn1.c
88 gen_files_digest_template = asn1_digest_template_asn1.c
89 gen_files_kx509 = asn1_kx509_asn1.c
90 gen_files_kx509_template = asn1_kx509_template_asn1.c
91 gen_files_x690sample = asn1_x690sample_asn1.c
92 gen_files_x690sample_template = asn1_x690sample_template_asn1.c
94 oid_resolution.lo: $(BUILT_SOURCES)
96 noinst_PROGRAMS = asn1_gen
98 bin_PROGRAMS = asn1_compile asn1_print
100 TESTS = check-der check-gen check-gen-template check-timegm check-ber check-template
101 check_PROGRAMS = $(TESTS)
103 asn1_gen_SOURCES = asn1_gen.c
104 asn1_print_SOURCES = asn1_print.c
105 asn1_print_SOURCES += $(gen_files_x690sample_template)
106 asn1_print_CPPFLAGS = -DASN1_PRINT_SUPPORTED
107 check_der_SOURCES = check-der.c check-common.c check-common.h
109 check_template_SOURCES = check-template.c check-common.c check-common.h
110 nodist_check_template_SOURCES = $(gen_files_test_template)
112 check_gen_template_CPPFLAGS = -DASN1_IOS_SUPPORTED
113 dist_check_gen_template_SOURCES = check-gen.c check-common.c check-common.h
114 nodist_check_gen_template_SOURCES =     $(gen_files_test_template) \
115                                         $(gen_files_x690sample_template)
117 dist_check_gen_SOURCES = check-gen.c check-common.c check-common.h
118 nodist_check_gen_SOURCES = $(gen_files_test) $(gen_files_x690sample)
120 build_HEADERZ = asn1-template.h
122 asn1_compile_SOURCES =                          \
123         asn1parse.y                             \
124         der.h                                   \
125         gen.c                                   \
126         gen_copy.c                              \
127         gen_decode.c                            \
128         gen_encode.c                            \
129         gen_print.c                             \
130         gen_free.c                              \
131         gen_glue.c                              \
132         gen_length.c                            \
133         gen_locl.h                              \
134         gen_seq.c                               \
135         gen_template.c                          \
136         hash.c                                  \
137         hash.h                                  \
138         lex.l                                   \
139         lex.h                                   \
140         main.c                                  \
141         asn1-template.h                         \
142         symbol.c                                \
143         symbol.h
145 dist_libasn1base_la_SOURCES =                   \
146         der_locl.h                              \
147         der.c                                   \
148         der.h                                   \
149         der_get.c                               \
150         der_put.c                               \
151         der_free.c                              \
152         der_print.c                             \
153         der_length.c                            \
154         der_copy.c                              \
155         der_cmp.c                               \
156         der_format.c                            \
157         fuzzer.c                                \
158         heim_asn1.h                             \
159         extra.c                                 \
160         roken_rename.h                          \
161         template.c                              \
162         timegm.c
164 dist_libasn1_la_SOURCES = oid_resolution.c
165 dist_libasn1template_la_SOURCES = oid_resolution.c
167 nodist_libasn1base_la_SOURCES =         \
168         asn1_err.h                      \
169         asn1_err.c
171 nodist_libasn1_la_SOURCES = $(BUILT_SOURCES)
173 if !ASN1_TEMPLATING
174 nodist_libasn1template_la_SOURCES = $(BUILT_TEMPLATE_SOURCES)
175 else
176 nodist_libasn1template_la_SOURCES = $(BUILT_SOURCES)
177 endif
179 asn1_compile_LDADD = \
180         $(LIB_roken) $(LEXLIB)
182 check_der_LDADD = \
183         libasn1.la \
184         $(LIB_roken)
186 check_template_LDADD = $(check_der_LDADD)
187 asn1_print_LDADD = libasn1template.la $(LIB_roken) $(LIB_com_err)
188 asn1_gen_LDADD = $(check_der_LDADD)
189 check_timegm_LDADD = $(check_der_LDADD)
191 check_gen_template_LDADD = \
192         libasn1template.la \
193         $(LIB_roken)
195 check_gen_LDADD = \
196         libasn1template.la \
197         $(LIB_roken)
199 check_ber_LDADD = $(check_gen_LDADD)
201 CLEANFILES = \
202         $(BUILT_SOURCES) \
203         $(gen_files_rfc2459) \
204         $(gen_files_rfc2459_template) \
205         $(gen_files_rfc4108) \
206         $(gen_files_rfc4108_template) \
207         $(gen_files_cms) \
208         $(gen_files_cms_template) \
209         $(gen_files_krb5) \
210         $(gen_files_krb5_template) \
211         $(gen_files_ocsp) \
212         $(gen_files_ocsp_template) \
213         $(gen_files_pkinit) \
214         $(gen_files_pkinit_template) \
215         $(gen_files_pkcs8) \
216         $(gen_files_pkcs8_template) \
217         $(gen_files_pkcs9) \
218         $(gen_files_pkcs9_template) \
219         $(gen_files_pkcs10) \
220         $(gen_files_pkcs10_template) \
221         $(gen_files_pkcs12) \
222         $(gen_files_pkcs12_template) \
223         $(gen_files_digest) \
224         $(gen_files_digest_template) \
225         $(gen_files_kx509) \
226         $(gen_files_kx509_template) \
227         $(gen_files_x690sample) \
228         $(gen_files_x690sample_template) \
229         $(gen_files_test) \
230         $(gen_files_test_template) \
231         $(nodist_check_gen_SOURCES) \
232         asn1parse.c asn1parse.h lex.c \
233         asn1_err.c asn1_err.h \
234         rfc2459_asn1_files rfc2459_asn1*.h \
235         rfc2459_template_asn1_files rfc2459_template_asn1*.h \
236         rfc4108_asn1_files rfc4108_asn1*.h \
237         rfc4108_template_asn1_files rfc4108_template_asn1*.h \
238         cms_asn1_files cms_asn1*.h \
239         cms_template_asn1_files cms_template_asn1* \
240         crmf_asn1_files crmf_asn1* \
241         crmf_template_asn1_files crmf_template_asn1* \
242         krb5_asn1_files krb5_asn1* \
243         krb5_template_asn1_files krb5_template_asn1* \
244         ocsp_asn1_files ocsp_asn1* \
245         ocsp_template_asn1_files ocsp_template_asn1* \
246         pkinit_asn1_files pkinit_asn1* \
247         pkinit_template_asn1_files pkinit_template_asn1* \
248         pkcs8_asn1_files pkcs8_asn1* \
249         pkcs8_template_asn1_files pkcs8_template_asn1* \
250         pkcs9_asn1_files pkcs9_asn1* \
251         pkcs9_template_asn1_files pkcs9_template_asn1* \
252         pkcs10_asn1_files pkcs10_asn1* \
253         pkcs10_template_asn1_files pkcs10_template_asn1* \
254         pkcs12_asn1_files pkcs12_asn1* \
255         pkcs12_template_asn1_files pkcs12_template_asn1* \
256         digest_asn1_files digest_asn1* \
257         digest_template_asn1_files digest_template_asn1* \
258         kx509_asn1_files kx509_asn1* \
259         kx509_template_asn1_files kx509_template_asn1* \
260         x690sample_asn1_files x690sample_asn1* \
261         x690sample_template_asn1_files x690sample_template_asn1* \
262         test_asn1_files test_asn1* \
263         test_template_asn1_files test_template_asn1* \
264         asn1_*_asn1.c *_asn1.json *_asn1_syms.c *_asn1_oids.c
266 dist_include_HEADERS = der.h heim_asn1.h
267 dist_include_HEADERS += $(srcdir)/der-protos.h $(srcdir)/der-private.h
268 dist_include_HEADERS += asn1-common.h
270 nodist_include_HEADERS = asn1_err.h
271 nodist_include_HEADERS += krb5_asn1.h
272 nodist_include_HEADERS += krb5_template_asn1.h
273 nodist_include_HEADERS += pkinit_asn1.h
274 nodist_include_HEADERS += pkinit_template_asn1.h
275 nodist_include_HEADERS += cms_asn1.h
276 nodist_include_HEADERS += cms_template_asn1.h
277 nodist_include_HEADERS += crmf_asn1.h
278 nodist_include_HEADERS += crmf_template_asn1.h
279 nodist_include_HEADERS += rfc2459_asn1.h
280 nodist_include_HEADERS += rfc2459_template_asn1.h
281 nodist_include_HEADERS += rfc4108_asn1.h
282 nodist_include_HEADERS += rfc4108_template_asn1.h
283 nodist_include_HEADERS += ocsp_asn1.h
284 nodist_include_HEADERS += ocsp_template_asn1.h
285 nodist_include_HEADERS += pkcs8_asn1.h
286 nodist_include_HEADERS += pkcs8_template_asn1.h
287 nodist_include_HEADERS += pkcs9_asn1.h
288 nodist_include_HEADERS += pkcs9_template_asn1.h
289 nodist_include_HEADERS += pkcs10_asn1.h
290 nodist_include_HEADERS += pkcs10_template_asn1.h
291 nodist_include_HEADERS += pkcs12_asn1.h
292 nodist_include_HEADERS += pkcs12_template_asn1.h
293 nodist_include_HEADERS += digest_asn1.h
294 nodist_include_HEADERS += digest_template_asn1.h
295 nodist_include_HEADERS += kx509_asn1.h
296 nodist_include_HEADERS += kx509_template_asn1.h
297 nodist_include_HEADERS += x690sample_asn1.h
298 nodist_include_HEADERS += x690sample_template_asn1.h
300 priv_headers  = krb5_asn1-priv.h
301 priv_headers += krb5_template_asn1-priv.h
302 priv_headers += pkinit_asn1-priv.h
303 priv_headers += pkinit_template_asn1-priv.h
304 priv_headers += cms_asn1-priv.h
305 priv_headers += cms_template_asn1-priv.h
306 priv_headers += crmf_asn1-priv.h
307 priv_headers += crmf_template_asn1-priv.h
308 priv_headers += rfc2459_asn1-priv.h
309 priv_headers += rfc2459_template_asn1-priv.h
310 priv_headers += rfc4108_asn1-priv.h
311 priv_headers += rfc4108_template_asn1-priv.h
312 priv_headers += ocsp_asn1-priv.h
313 priv_headers += ocsp_template_asn1-priv.h
314 priv_headers += pkcs8_asn1-priv.h
315 priv_headers += pkcs8_template_asn1-priv.h
316 priv_headers += pkcs9_asn1-priv.h
317 priv_headers += pkcs9_template_asn1-priv.h
318 priv_headers += pkcs10_asn1-priv.h
319 priv_headers += pkcs10_template_asn1-priv.h
320 priv_headers += pkcs12_asn1-priv.h
321 priv_headers += pkcs12_template_asn1-priv.h
322 priv_headers += digest_asn1-priv.h
323 priv_headers += digest_template_asn1-priv.h
324 priv_headers += kx509_asn1-priv.h
325 priv_headers += kx509_template_asn1-priv.h
326 priv_headers += x690sample_asn1-priv.h
327 priv_headers += x690sample_template_asn1-priv.h
328 priv_headers += test_asn1.h test_asn1-priv.h
329 priv_headers += test_template_asn1.h test_template_asn1-priv.h
333 $(asn1_compile_OBJECTS): asn1parse.h asn1parse.c $(srcdir)/der-protos.h $(srcdir)/der-private.h
334 $(libasn1_la_OBJECTS): $(nodist_include_HEADERS) $(priv_headers) asn1_err.h $(srcdir)/der-protos.h $(srcdir)/der-private.h
335 $(libasn1template_la_OBJECTS): $(nodist_include_HEADERS) $(priv_headers) asn1_err.h $(srcdir)/der-protos.h $(srcdir)/der-private.h
336 $(libasn1base_la_OBJECTS): asn1_err.h $(srcdir)/der-protos.h $(srcdir)/der-private.h
337 $(check_gen_OBJECTS): test_asn1.h
338 $(check_template_OBJECTS): test_asn1_files
339 $(asn1_print_OBJECTS): $(nodist_include_HEADERS) $(priv_headers)
341 asn1parse.h: asn1parse.c
343 $(gen_files_krb5) krb5_asn1.h krb5_asn1-priv.h: krb5_asn1_files
344 $(gen_files_krb5_template) krb5_template_asn1.h krb5_template_asn1-priv.h: krb5_template_asn1_files
345 $(gen_files_ocsp) ocsp_asn1.h ocsp_asn1-priv.h: ocsp_asn1_files
346 $(gen_files_ocsp_template) ocsp_template_asn1.h ocsp_template_asn1-priv.h: ocsp_template_asn1_files
347 $(gen_files_pkinit) pkinit_asn1.h pkinit_asn1-priv.h: pkinit_asn1_files
348 $(gen_files_pkinit_template) pkinit_template_asn1.h pkinit_template_asn1-priv.h: pkinit_template_asn1_files
349 $(gen_files_pkcs8) pkcs8_asn1.h pkcs8_asn1-priv.h: pkcs8_asn1_files
350 $(gen_files_pkcs8_template) pkcs8_template_asn1.h pkcs8_template_asn1-priv.h: pkcs8_template_asn1_files
351 $(gen_files_pkcs9) pkcs9_asn1.h pkcs9_asn1-priv.h: pkcs9_asn1_files
352 $(gen_files_pkcs9_template) pkcs9_template_asn1.h pkcs9_template_asn1-priv.h: pkcs9_template_asn1_files
353 $(gen_files_pkcs10) pkcs10_asn1.h pkcs10_asn1-priv.h: pkcs10_asn1_files
354 $(gen_files_pkcs10_template) pkcs10_template_asn1.h pkcs10_template_asn1-priv.h: pkcs10_template_asn1_files
355 $(gen_files_pkcs12) pkcs12_asn1.h pkcs12_asn1-priv.h: pkcs12_asn1_files
356 $(gen_files_pkcs12_template) pkcs12_template_asn1.h pkcs12_template_asn1-priv.h: pkcs12_template_asn1_files
357 $(gen_files_digest) digest_asn1.h digest_asn1-priv.h: digest_asn1_files
358 $(gen_files_digest_template) digest_template_asn1.h digest_template_asn1-priv.h: digest_template_asn1_files
359 $(gen_files_kx509) kx509_asn1.h kx509_asn1-priv.h: kx509_asn1_files
360 $(gen_files_kx509_template) kx509_template_asn1.h kx509_template_asn1-priv.h: kx509_template_asn1_files
361 $(gen_files_rfc2459) rfc2459_asn1.h rfc2459_asn1-priv.h: rfc2459_asn1_files
362 $(gen_files_rfc2459_template) rfc2459_template_asn1.h rfc2459_template_asn1-priv.h: rfc2459_template_asn1_files
363 $(gen_files_rfc4108) rfc4108_asn1.h rfc4108_asn1-priv.h: rfc4108_asn1_files
364 $(gen_files_rfc4108_template) rfc4108_template_asn1.h rfc4108_template_asn1-priv.h: rfc4108_template_asn1_files
365 $(gen_files_cms) cms_asn1.h cms_asn1-priv.h: cms_asn1_files
366 $(gen_files_cms_template) cms_template_asn1.h cms_template_asn1-priv.h: cms_template_asn1_files
367 $(gen_files_crmf) crmf_asn1.h crmf_asn1-priv.h: crmf_asn1_files
368 $(gen_files_crmf_template) crmf_template_asn1.h crmf_template_asn1-priv.h: crmf_template_asn1_files
369 $(gen_files_x690sample) x690sample_asn1.h x690sample_asn1-priv.h: x690sample_asn1_files
370 $(gen_files_x690sample_template) x690sample_template_asn1.h x690sample_template_asn1-priv.h: x690sample_template_asn1_files
371 $(gen_files_test) test_asn1.h test_asn1-priv.h: test_asn1_files
372 $(gen_files_test_template) test_template_asn1.h test_template_asn1-priv.h: test_template_asn1_files
374 if ASN1_TEMPLATING
375 TEMPLATE_OPTION=--template
376 else
377 TEMPLATE_OPTION=
378 endif
380 # If the default is not templating, then we build a variant of libasn1 that is
381 # templated anyways.
382 rfc2459_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/rfc2459.asn1
383         $(ASN1_COMPILE) --one-code-file --template --option-file=$(srcdir)/rfc2459.opt $(srcdir)/rfc2459.asn1 rfc2459_template_asn1 || (rm -f rfc2459_template_asn1_files ; exit 1)
384         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_rfc2459_template_asn1.c
386 rfc4108_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/rfc4108.asn1
387         $(ASN1_COMPILE) --one-code-file --template $(srcdir)/rfc4108.asn1 rfc4108_template_asn1 || (rm -f rfc4108_template_asn1_files ; exit 1)
388         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_rfc4108_template_asn1.c
390 cms_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/cms.asn1 $(srcdir)/cms.opt
391         $(ASN1_COMPILE) --one-code-file --template --option-file=$(srcdir)/cms.opt $(srcdir)/cms.asn1 cms_template_asn1 || (rm -f cms_template_asn1_files ; exit 1)
392         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_cms_template_asn1.c
394 crmf_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/crmf.asn1 $(srcdir)/crmf.opt
395         $(ASN1_COMPILE) --one-code-file --template --option-file=$(srcdir)/crmf.opt $(srcdir)/crmf.asn1 crmf_template_asn1 || (rm -f crmf_template_asn1_files ; exit 1)
396         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_crmf_template_asn1.c
398 krb5_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/krb5.asn1 $(srcdir)/krb5.opt
399         $(ASN1_COMPILE) --one-code-file --template                      \
400                         --option-file=$(srcdir)/krb5.opt                \
401                         $(srcdir)/krb5.asn1 krb5_template_asn1 || (rm -f krb5_template_asn1_files ; exit 1)
402         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_krb5_template_asn1.c
404 ocsp_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/ocsp.asn1
405         $(ASN1_COMPILE) --one-code-file --template --option-file=$(srcdir)/ocsp.opt $(srcdir)/ocsp.asn1 ocsp_template_asn1 || (rm -f ocsp_template_asn1_files ; exit 1)
406         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_ocsp_template_asn1.c
408 pkinit_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkinit.asn1
409         $(ASN1_COMPILE) --one-code-file --template $(srcdir)/pkinit.asn1 pkinit_template_asn1 || (rm -f pkinit_template_asn1_files ; exit 1)
410         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkinit_template_asn1.c
412 pkcs8_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs8.asn1
413         $(ASN1_COMPILE) --one-code-file --template $(srcdir)/pkcs8.asn1 pkcs8_template_asn1 || (rm -f pkcs8_template_asn1_files ; exit 1)
414         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkcs8_template_asn1.c
416 pkcs9_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs9.asn1
417         $(ASN1_COMPILE) --one-code-file --template $(srcdir)/pkcs9.asn1 pkcs9_template_asn1 || (rm -f pkcs9_template_asn1_files ; exit 1)
418         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkcs9_template_asn1.c
420 pkcs10_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs10.asn1
421         $(ASN1_COMPILE) --one-code-file --template --option-file=$(srcdir)/pkcs10.opt $(srcdir)/pkcs10.asn1 pkcs10_template_asn1 || (rm -f pkcs10_template_asn1_files ; exit 1)
422         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkcs10_template_asn1.c
424 pkcs12_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs12.asn1
425         $(ASN1_COMPILE) --one-code-file --template $(srcdir)/pkcs12.asn1 pkcs12_template_asn1 || (rm -f pkcs12_template_asn1_files ; exit 1)
426         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkcs12_template_asn1.c
428 digest_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/digest.asn1
429         $(ASN1_COMPILE) --one-code-file --template $(srcdir)/digest.asn1 digest_template_asn1 || (rm -f digest_template_asn1_files ; exit 1)
430         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_digest_template_asn1.c
432 kx509_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/kx509.asn1
433         $(ASN1_COMPILE) --one-code-file --template $(srcdir)/kx509.asn1 kx509_template_asn1 || (rm -f kx509_template_asn1_files ; exit 1)
434         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_kx509_template_asn1.c
436 rfc2459_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/rfc2459.asn1
437         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) --option-file=$(srcdir)/rfc2459.opt $(srcdir)/rfc2459.asn1 rfc2459_asn1 || (rm -f rfc2459_asn1_files ; exit 1)
438         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_rfc2459_asn1.c
440 rfc4108_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/rfc4108.asn1
441         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) $(srcdir)/rfc4108.asn1 rfc4108_asn1 || (rm -f rfc4108_asn1_files ; exit 1)
442         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_rfc4108_asn1.c
444 cms_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/cms.asn1 $(srcdir)/cms.opt
445         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) --option-file=$(srcdir)/cms.opt $(srcdir)/cms.asn1 cms_asn1 || (rm -f cms_asn1_files ; exit 1)
446         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_cms_asn1.c
448 crmf_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/crmf.asn1 $(srcdir)/crmf.opt
449         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) --option-file=$(srcdir)/crmf.opt $(srcdir)/crmf.asn1 crmf_asn1 || (rm -f crmf_asn1_files ; exit 1)
450         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_crmf_asn1.c
452 krb5_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/krb5.asn1 $(srcdir)/krb5.opt
453         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION)              \
454                         --option-file=$(srcdir)/krb5.opt                \
455                         $(srcdir)/krb5.asn1 krb5_asn1 || (rm -f krb5_asn1_files ; exit 1)
456         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_krb5_asn1.c
458 ocsp_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/ocsp.asn1
459         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) --option-file=$(srcdir)/ocsp.opt $(srcdir)/ocsp.asn1 ocsp_asn1 || (rm -f ocsp_asn1_files ; exit 1)
460         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_ocsp_asn1.c
462 pkinit_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkinit.asn1
463         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) $(srcdir)/pkinit.asn1 pkinit_asn1 || (rm -f pkinit_asn1_files ; exit 1)
464         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkinit_asn1.c
466 pkcs8_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs8.asn1
467         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) $(srcdir)/pkcs8.asn1 pkcs8_asn1 || (rm -f pkcs8_asn1_files ; exit 1)
468         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkcs8_asn1.c
470 pkcs9_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs9.asn1
471         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) $(srcdir)/pkcs9.asn1 pkcs9_asn1 || (rm -f pkcs9_asn1_files ; exit 1)
472         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkcs9_asn1.c
474 pkcs10_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs10.asn1
475         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) --option-file=$(srcdir)/pkcs10.opt $(srcdir)/pkcs10.asn1 pkcs10_asn1 || (rm -f pkcs10_asn1_files ; exit 1)
476         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkcs10_asn1.c
478 pkcs12_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs12.asn1
479         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) $(srcdir)/pkcs12.asn1 pkcs12_asn1 || (rm -f pkcs12_asn1_files ; exit 1)
480         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_pkcs12_asn1.c
482 digest_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/digest.asn1
483         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) $(srcdir)/digest.asn1 digest_asn1 || (rm -f digest_asn1_files ; exit 1)
484         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_digest_asn1.c
486 kx509_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/kx509.asn1
487         $(ASN1_COMPILE) --one-code-file $(TEMPLATE_OPTION) $(srcdir)/kx509.asn1 kx509_asn1 || (rm -f kx509_asn1_files ; exit 1)
488         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_kx509_asn1.c
490 x690sample_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/x690sample.asn1
491         $(ASN1_COMPILE) --one-code-file --template $(srcdir)/x690sample.asn1 x690sample_template_asn1 || (rm -f x690sample_template_asn1_files ; exit 1)
492         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_x690sample_template_asn1.c
494 x690sample_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/x690sample.asn1
495         $(ASN1_COMPILE) --one-code-file $(srcdir)/x690sample.asn1 x690sample_asn1 || (rm -f x690sample_asn1_files ; exit 1)
496         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_x690sample_asn1.c
498 test_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/test.asn1
499         $(ASN1_COMPILE) --one-code-file                                 \
500                         --template                                      \
501                         --option-file=$(srcdir)/test.opt                \
502                         $(srcdir)/test.asn1 test_template_asn1 || (rm -f test_template_asn1_files ; exit 1)
503         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_test_template_asn1.c
505 test_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/test.asn1
506         $(ASN1_COMPILE) --one-code-file                                 \
507                         --option-file=$(srcdir)/test.opt                \
508                         $(srcdir)/test.asn1 test_asn1 || (rm -f test_asn1_files ; exit 1)
509         @$(CLANG_FORMAT) -style=$(CLANG_FORMAT_STYLE) -i asn1_test_asn1.c
512 EXTRA_DIST =                    \
513         NTMakefile              \
514         README-template.md      \
515         asn1_compile-version.rc \
516         libasn1-exports.def     \
517         canthandle.asn1         \
518         cms.asn1                \
519         cms.opt                 \
520         crmf.asn1               \
521         crmf.opt                \
522         digest.asn1             \
523         krb5.asn1               \
524         krb5.opt                \
525         kx509.asn1              \
526         ocsp.asn1               \
527         ocsp.opt                \
528         pkcs10.asn1             \
529         pkcs10.opt              \
530         pkcs12.asn1             \
531         pkcs8.asn1              \
532         pkcs9.asn1              \
533         pkinit.asn1             \
534         pku2u.asn1              \
535         rfc2459.asn1            \
536         rfc2459.opt             \
537         rfc4108.asn1            \
538         setchgpw2.asn1          \
539         tcg.asn1                \
540         test.asn1               \
541         test.opt                \
542         x690sample.asn1         \
543         test.gen                \
544         asn1_err.et             \
545         asn1_err.c              \
546         asn1_err.h              \
547         asn1_print.1            \
548         asn1_compile.1          \
549         version-script.map
551 DER_PROTOS = $(srcdir)/der-protos.h $(srcdir)/der-private.h
553 ALL_OBJECTS  = $(libasn1_la_OBJECTS)
554 ALL_OBJECTS += $(libasn1template_la_OBJECTS)
555 ALL_OBJECTS += $(libasn1base_la_OBJECTS)
556 ALL_OBJECTS += $(asn1_print_OBJECTS)
557 ALL_OBJECTS += $(asn1_compile_OBJECTS)
558 ALL_OBJECTS += $(asn1_gen_OBJECTS)
559 ALL_OBJECTS += $(check_template_OBJECTS)
561 $(ALL_OBJECTS): $(DER_PROTOS) asn1_err.h
563 $(srcdir)/der-protos.h: $(dist_libasn1base_la_SOURCES) $(dist_libasn1_la_SOURCES)
564         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -o der-protos.h $(dist_libasn1base_la_SOURCES) $(dist_libasn1_la_SOURCES) || rm -f der-protos.h
566 $(srcdir)/der-private.h: $(dist_libasn1base_la_SOURCES) $(dist_libasn1_la_SOURCES)
567         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p der-private.h $(dist_libasn1base_la_SOURCES) $(dist_libasn1_la_SOURCES) || rm -f der-private.h