| 1 |
# $Id$ |
| 2 |
|
| 3 |
include $(top_srcdir)/Makefile.am.common |
| 4 |
|
| 5 |
YFLAGS = -d -t |
| 6 |
|
| 7 |
AM_CPPFLAGS += $(ROKEN_RENAME) |
| 8 |
|
| 9 |
lib_LTLIBRARIES = libasn1.la |
| 10 |
libasn1_la_LDFLAGS = -version-info 8:0:0 |
| 11 |
|
| 12 |
noinst_LTLIBRARIES = libasn1base.la |
| 13 |
|
| 14 |
if versionscript |
| 15 |
libasn1_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map |
| 16 |
endif |
| 17 |
|
| 18 |
|
| 19 |
libasn1_la_LIBADD = \ |
| 20 |
libasn1base.la \ |
| 21 |
@LIB_com_err@ \ |
| 22 |
$(LIBADD_roken) |
| 23 |
|
| 24 |
BUILT_SOURCES = \ |
| 25 |
$(gen_files_rfc2459:.x=.c) \ |
| 26 |
$(gen_files_cms:.x=.c) \ |
| 27 |
$(gen_files_krb5:.x=.c) \ |
| 28 |
$(gen_files_pkinit:.x=.c) \ |
| 29 |
$(gen_files_pkcs8:.x=.c) \ |
| 30 |
$(gen_files_pkcs9:.x=.c) \ |
| 31 |
$(gen_files_pkcs12:.x=.c) \ |
| 32 |
$(gen_files_digest:.x=.c) \ |
| 33 |
$(gen_files_kx509:.x=.c) |
| 34 |
|
| 35 |
gen_files_krb5 = asn1_krb5_asn1.x |
| 36 |
gen_files_cms = asn1_cms_asn1.x |
| 37 |
gen_files_rfc2459 = asn1_rfc2459_asn1.x |
| 38 |
gen_files_pkinit = asn1_pkinit_asn1.x |
| 39 |
gen_files_pkcs12 = asn1_pkcs12_asn1.x |
| 40 |
gen_files_pkcs8 = asn1_pkcs8_asn1.x |
| 41 |
gen_files_pkcs9 = asn1_pkcs9_asn1.x |
| 42 |
gen_files_test_template = test_template_asn1-template.x |
| 43 |
gen_files_test = asn1_test_asn1.x |
| 44 |
gen_files_digest = asn1_digest_asn1.x |
| 45 |
gen_files_kx509 = asn1_kx509_asn1.x |
| 46 |
|
| 47 |
noinst_PROGRAMS = asn1_gen |
| 48 |
|
| 49 |
libexec_heimdal_PROGRAMS = asn1_compile asn1_print |
| 50 |
|
| 51 |
TESTS = check-der check-gen check-timegm check-ber check-template |
| 52 |
check_PROGRAMS = $(TESTS) |
| 53 |
|
| 54 |
asn1_gen_SOURCES = asn1_gen.c |
| 55 |
asn1_print_SOURCES = asn1_print.c |
| 56 |
check_der_SOURCES = check-der.c check-common.c check-common.h |
| 57 |
|
| 58 |
check_template_SOURCES = check-template.c check-common.c check-common.h |
| 59 |
nodist_check_template_SOURCES = $(gen_files_test_template) |
| 60 |
|
| 61 |
dist_check_gen_SOURCES = check-gen.c check-common.c check-common.h |
| 62 |
nodist_check_gen_SOURCES = $(gen_files_test:.x=.c) |
| 63 |
|
| 64 |
build_HEADERZ = asn1-template.h |
| 65 |
|
| 66 |
asn1_compile_SOURCES = \ |
| 67 |
asn1_queue.h \ |
| 68 |
asn1parse.y \ |
| 69 |
der.h \ |
| 70 |
gen.c \ |
| 71 |
gen_copy.c \ |
| 72 |
gen_decode.c \ |
| 73 |
gen_encode.c \ |
| 74 |
gen_free.c \ |
| 75 |
gen_glue.c \ |
| 76 |
gen_length.c \ |
| 77 |
gen_locl.h \ |
| 78 |
gen_seq.c \ |
| 79 |
gen_template.c \ |
| 80 |
hash.c \ |
| 81 |
hash.h \ |
| 82 |
lex.l \ |
| 83 |
lex.h \ |
| 84 |
main.c \ |
| 85 |
asn1-template.h \ |
| 86 |
symbol.c \ |
| 87 |
symbol.h |
| 88 |
|
| 89 |
dist_libasn1base_la_SOURCES = \ |
| 90 |
der_locl.h \ |
| 91 |
der.c \ |
| 92 |
der.h \ |
| 93 |
der_get.c \ |
| 94 |
der_put.c \ |
| 95 |
der_free.c \ |
| 96 |
der_length.c \ |
| 97 |
der_copy.c \ |
| 98 |
der_cmp.c \ |
| 99 |
der_format.c \ |
| 100 |
fuzzer.c \ |
| 101 |
heim_asn1.h \ |
| 102 |
extra.c \ |
| 103 |
roken_rename.h \ |
| 104 |
template.c \ |
| 105 |
timegm.c |
| 106 |
|
| 107 |
nodist_libasn1base_la_SOURCES = \ |
| 108 |
asn1_err.h \ |
| 109 |
asn1_err.c |
| 110 |
|
| 111 |
nodist_libasn1_la_SOURCES = $(BUILT_SOURCES) |
| 112 |
|
| 113 |
asn1_compile_LDADD = \ |
| 114 |
$(LIB_roken) $(LEXLIB) |
| 115 |
|
| 116 |
check_der_LDADD = \ |
| 117 |
libasn1base.la \ |
| 118 |
$(LIB_roken) |
| 119 |
|
| 120 |
check_template_LDADD = $(check_der_LDADD) |
| 121 |
asn1_print_LDADD = $(check_der_LDADD) $(LIB_com_err) |
| 122 |
asn1_gen_LDADD = $(check_der_LDADD) |
| 123 |
check_timegm_LDADD = $(check_der_LDADD) |
| 124 |
|
| 125 |
check_gen_LDADD = \ |
| 126 |
libasn1.la \ |
| 127 |
$(LIB_roken) |
| 128 |
|
| 129 |
check_ber_LDADD = $(check_gen_LDADD) |
| 130 |
|
| 131 |
CLEANFILES = \ |
| 132 |
$(BUILT_SOURCES) \ |
| 133 |
$(gen_files_rfc2459) \ |
| 134 |
$(gen_files_cms) \ |
| 135 |
$(gen_files_krb5) \ |
| 136 |
$(gen_files_pkinit) \ |
| 137 |
$(gen_files_pkcs8) \ |
| 138 |
$(gen_files_pkcs9) \ |
| 139 |
$(gen_files_pkcs12) \ |
| 140 |
$(gen_files_digest) \ |
| 141 |
$(gen_files_kx509) \ |
| 142 |
$(gen_files_test) \ |
| 143 |
$(gen_files_test_template) \ |
| 144 |
$(nodist_check_gen_SOURCES) \ |
| 145 |
asn1_err.c asn1_err.h \ |
| 146 |
rfc2459_asn1_files rfc2459_asn1*.h* \ |
| 147 |
cms_asn1_files cms_asn1*.h* \ |
| 148 |
krb5_asn1_files krb5_asn1*.h* \ |
| 149 |
pkinit_asn1_files pkinit_asn1*.h* \ |
| 150 |
pkcs8_asn1_files pkcs8_asn1*.h* \ |
| 151 |
pkcs9_asn1_files pkcs9_asn1*.h* \ |
| 152 |
pkcs12_asn1_files pkcs12_asn1*.h* \ |
| 153 |
digest_asn1_files digest_asn1*.h* \ |
| 154 |
kx509_asn1_files kx509_asn1*.h* \ |
| 155 |
test_asn1_files test_asn1*.h* \ |
| 156 |
test_template_asn1* \ |
| 157 |
asn1_*.x |
| 158 |
|
| 159 |
dist_include_HEADERS = der.h heim_asn1.h |
| 160 |
dist_include_HEADERS += $(srcdir)/der-protos.h $(srcdir)/der-private.h |
| 161 |
dist_include_HEADERS += asn1-common.h |
| 162 |
|
| 163 |
nodist_include_HEADERS = asn1_err.h |
| 164 |
nodist_include_HEADERS += krb5_asn1.h |
| 165 |
nodist_include_HEADERS += pkinit_asn1.h |
| 166 |
nodist_include_HEADERS += cms_asn1.h |
| 167 |
nodist_include_HEADERS += rfc2459_asn1.h |
| 168 |
nodist_include_HEADERS += pkcs8_asn1.h |
| 169 |
nodist_include_HEADERS += pkcs9_asn1.h |
| 170 |
nodist_include_HEADERS += pkcs12_asn1.h |
| 171 |
nodist_include_HEADERS += digest_asn1.h |
| 172 |
nodist_include_HEADERS += kx509_asn1.h |
| 173 |
|
| 174 |
priv_headers = krb5_asn1-priv.h |
| 175 |
priv_headers += pkinit_asn1-priv.h |
| 176 |
priv_headers += cms_asn1-priv.h |
| 177 |
priv_headers += rfc2459_asn1-priv.h |
| 178 |
priv_headers += pkcs8_asn1-priv.h |
| 179 |
priv_headers += pkcs9_asn1-priv.h |
| 180 |
priv_headers += pkcs12_asn1-priv.h |
| 181 |
priv_headers += digest_asn1-priv.h |
| 182 |
priv_headers += kx509_asn1-priv.h |
| 183 |
priv_headers += test_template_asn1.h test_template_asn1-priv.h |
| 184 |
priv_headers += test_asn1.h test_asn1-priv.h |
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
$(asn1_compile_OBJECTS): asn1parse.h asn1parse.c $(srcdir)/der-protos.h $(srcdir)/der-private.h |
| 189 |
$(libasn1_la_OBJECTS): $(nodist_include_HEADERS) $(priv_headers) asn1_err.h $(srcdir)/der-protos.h $(srcdir)/der-private.h |
| 190 |
$(libasn1base_la_OBJECTS): asn1_err.h $(srcdir)/der-protos.h $(srcdir)/der-private.h |
| 191 |
$(check_gen_OBJECTS): test_asn1.h |
| 192 |
$(check_template_OBJECTS): test_asn1_files |
| 193 |
$(asn1_print_OBJECTS): krb5_asn1.h |
| 194 |
|
| 195 |
asn1parse.h: asn1parse.c |
| 196 |
|
| 197 |
$(gen_files_krb5) krb5_asn1.hx krb5_asn1-priv.hx: krb5_asn1_files |
| 198 |
$(gen_files_pkinit) pkinit_asn1.hx pkinit_asn1-priv.hx: pkinit_asn1_files |
| 199 |
$(gen_files_pkcs8) pkcs8_asn1.hx pkcs8_asn1-priv.hx: pkcs8_asn1_files |
| 200 |
$(gen_files_pkcs9) pkcs9_asn1.hx pkcs9_asn1-priv.hx: pkcs9_asn1_files |
| 201 |
$(gen_files_pkcs12) pkcs12_asn1.hx pkcs12_asn1-priv.hx: pkcs12_asn1_files |
| 202 |
$(gen_files_digest) digest_asn1.hx digest_asn1-priv.hx: digest_asn1_files |
| 203 |
$(gen_files_kx509) kx509_asn1.hx kx509_asn1-priv.hx: kx509_asn1_files |
| 204 |
$(gen_files_rfc2459) rfc2459_asn1.hx rfc2459_asn1-priv.hx: rfc2459_asn1_files |
| 205 |
$(gen_files_cms) cms_asn1.hx cms_asn1-priv.hx: cms_asn1_files |
| 206 |
$(gen_files_test) test_asn1.hx test_asn1-priv.hx: test_asn1_files |
| 207 |
$(gen_files_test_template) test_template_asn1.hx test_template_asn1-priv.hx: test_template_asn1_files |
| 208 |
|
| 209 |
rfc2459_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/rfc2459.asn1 |
| 210 |
$(ASN1_COMPILE) --one-code-file --preserve-binary=TBSCertificate --preserve-binary=TBSCRLCertList --preserve-binary=Name --sequence=GeneralNames --sequence=Extensions --sequence=CRLDistributionPoints $(srcdir)/rfc2459.asn1 rfc2459_asn1 || (rm -f rfc2459_asn1_files ; exit 1) |
| 211 |
|
| 212 |
cms_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/cms.asn1 $(srcdir)/cms.opt |
| 213 |
$(ASN1_COMPILE) --one-code-file --option-file=$(srcdir)/cms.opt $(srcdir)/cms.asn1 cms_asn1 || (rm -f cms_asn1_files ; exit 1) |
| 214 |
|
| 215 |
krb5_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/krb5.asn1 $(srcdir)/krb5.opt |
| 216 |
$(ASN1_COMPILE) --one-code-file --option-file=$(srcdir)/krb5.opt $(srcdir)/krb5.asn1 krb5_asn1 || (rm -f krb5_asn1_files ; exit 1) |
| 217 |
|
| 218 |
pkinit_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkinit.asn1 |
| 219 |
$(ASN1_COMPILE) --one-code-file $(srcdir)/pkinit.asn1 pkinit_asn1 || (rm -f pkinit_asn1_files ; exit 1) |
| 220 |
|
| 221 |
pkcs8_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs8.asn1 |
| 222 |
$(ASN1_COMPILE) --one-code-file $(srcdir)/pkcs8.asn1 pkcs8_asn1 || (rm -f pkcs8_asn1_files ; exit 1) |
| 223 |
|
| 224 |
pkcs9_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs9.asn1 |
| 225 |
$(ASN1_COMPILE) --one-code-file $(srcdir)/pkcs9.asn1 pkcs9_asn1 || (rm -f pkcs9_asn1_files ; exit 1) |
| 226 |
|
| 227 |
pkcs12_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/pkcs12.asn1 |
| 228 |
$(ASN1_COMPILE) --one-code-file $(srcdir)/pkcs12.asn1 pkcs12_asn1 || (rm -f pkcs12_asn1_files ; exit 1) |
| 229 |
|
| 230 |
digest_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/digest.asn1 |
| 231 |
$(ASN1_COMPILE) --one-code-file $(srcdir)/digest.asn1 digest_asn1 || (rm -f digest_asn1_files ; exit 1) |
| 232 |
|
| 233 |
kx509_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/kx509.asn1 |
| 234 |
$(ASN1_COMPILE) --one-code-file $(srcdir)/kx509.asn1 kx509_asn1 || (rm -f kx509_asn1_files ; exit 1) |
| 235 |
|
| 236 |
test_template_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/test.asn1 |
| 237 |
$(ASN1_COMPILE) --template --sequence=TESTSeqOf $(srcdir)/test.asn1 test_template_asn1 || (rm -f test_template_asn1_files ; exit 1) |
| 238 |
|
| 239 |
test_asn1_files: asn1_compile$(EXEEXT) $(srcdir)/test.asn1 |
| 240 |
$(ASN1_COMPILE) --one-code-file --sequence=TESTSeqOf $(srcdir)/test.asn1 test_asn1 || (rm -f test_asn1_files ; exit 1) |
| 241 |
|
| 242 |
|
| 243 |
EXTRA_DIST = \ |
| 244 |
NTMakefile \ |
| 245 |
README.template \ |
| 246 |
asn1_compile-version.rc \ |
| 247 |
libasn1-exports.def \ |
| 248 |
cms.asn1 \ |
| 249 |
cms.opt \ |
| 250 |
asn1_err.et \ |
| 251 |
canthandle.asn1 \ |
| 252 |
digest.asn1 \ |
| 253 |
krb5.asn1 \ |
| 254 |
krb5.opt \ |
| 255 |
kx509.asn1 \ |
| 256 |
pkcs12.asn1 \ |
| 257 |
pkcs8.asn1 \ |
| 258 |
pkcs9.asn1 \ |
| 259 |
pkinit.asn1 \ |
| 260 |
rfc2459.asn1 \ |
| 261 |
setchgpw2.asn1 \ |
| 262 |
test.asn1 \ |
| 263 |
test.gen \ |
| 264 |
version-script.map |
| 265 |
|
| 266 |
DER_PROTOS = $(srcdir)/der-protos.h $(srcdir)/der-private.h |
| 267 |
|
| 268 |
ALL_OBJECTS = $(libasn1_la_OBJECTS) |
| 269 |
ALL_OBJECTS += $(libasn1base_la_OBJECTS) |
| 270 |
ALL_OBJECTS += $(asn1_print_OBJECTS) |
| 271 |
ALL_OBJECTS += $(asn1_compile_OBJECTS) |
| 272 |
ALL_OBJECTS += $(asn1_gen_OBJECTS) |
| 273 |
ALL_OBJECTS += $(check_template_OBJECTS) |
| 274 |
|
| 275 |
$(ALL_OBJECTS): $(DER_PROTOS) asn1_err.h |
| 276 |
|
| 277 |
$(srcdir)/der-protos.h: $(dist_libasn1base_la_SOURCES) |
| 278 |
cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -o der-protos.h $(dist_libasn1base_la_SOURCES) || rm -f der-protos.h |
| 279 |
|
| 280 |
$(srcdir)/der-private.h: $(dist_libasn1base_la_SOURCES) |
| 281 |
cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p der-private.h $(dist_libasn1base_la_SOURCES) || rm -f der-private.h |