]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libsecureboot/openpgp/Makefile.inc
MFV r345515: netbsd-tests: import memory bump for libc/regex/t_exhaust
[FreeBSD/FreeBSD.git] / lib / libsecureboot / openpgp / Makefile.inc
1 # $FreeBSD$
2
3 # decode OpenPGP signatures per rfc4880
4 .PATH: ${.PARSEDIR}
5
6 CFLAGS+= -DUSE_BEARSSL
7
8 BRSSL_SRCS+= dearmor.c
9 SRCS+= \
10         decode.c \
11         opgp_key.c \
12         opgp_sig.c
13
14 opgp_key.o opgp_key.po opgp_key.pico: ta_asc.h
15
16 # Generate ta_asc.h containing one or more OpenPGP trust anchors.
17 #
18 # Since each trust anchor must be processed individually,
19 # we create ta_ASC as a list of pointers to them.
20 #
21 # If we are doing self-tests, we define another arrary vc_ASC
22 # containing pointers to a signature of each trust anchor.
23 # It is assumed that these v*.asc files are named similarly to
24 # the appropriate t*.asc so that the relative order of vc_ASC
25 # entries matches ta_ASC.
26
27 ta_asc.h: ${.ALLTARGETS:M[tv]*.asc:O:u}
28 .if ${VE_SIGNATURE_LIST:MOPENPGP} != ""
29         @( echo '/* Autogenerated - DO NOT EDIT!!! */'; echo; \
30         echo "#define HAVE_TA_ASC 1"; \
31         set -- ${.ALLSRC:Mt*.asc:@f@$f ${f:T:R}@}; \
32         while test $$# -ge 2; do \
33                 file2c -sx "static const char $$2[] = {" ', 0x00 };' < $$1; \
34                 shift 2; \
35         done; \
36         echo 'static const char *ta_ASC[] = { ${.ALLSRC:Mt*.asc:T:R:ts,}, NULL };'; \
37         echo; ) > ${.TARGET}
38 .if ${VE_SELF_TESTS} != "no"
39         @( echo "#define HAVE_VC_ASC 1"; \
40         set -- ${.ALLSRC:Mv*.asc:@f@$f ${f:T:R}@}; \
41         while test $$# -ge 2; do \
42                 file2c -sx "static const char $$2[] = {" ', 0x00 };' < $$1; \
43                 shift 2; \
44         done; \
45         echo 'static const char *vc_ASC[] = { ${.ALLSRC:Mv*.asc:T:R:ts,}, NULL };'; \
46         echo; ) >> ${.TARGET}
47 .endif
48 .endif