diff options
Diffstat (limited to 'src/grp-resolve/libbasic-dns')
-rw-r--r-- | src/grp-resolve/libbasic-dns/Makefile | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/grp-resolve/libbasic-dns/Makefile b/src/grp-resolve/libbasic-dns/Makefile index 40ee1e85b5..e5c32d8539 100644 --- a/src/grp-resolve/libbasic-dns/Makefile +++ b/src/grp-resolve/libbasic-dns/Makefile @@ -23,15 +23,30 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -$(outdir)/dns_type-list.txt: src/resolve/dns-type.h +$(outdir)/dns_type-list.txt: $(srcdir)/dns-type.h $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@ -$(outdir)/dns_type-to-name.h: src/resolve/dns_type-list.txt +$(outdir)/dns_type-to-name.h: $(outdir)/dns_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@ -$(outdir)/dns_type-from-name.gperf: src/resolve/dns_type-list.txt +$(outdir)/dns_type-from-name.gperf: $(outdir)/dns_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@ +basic_dns_sources = +libbasic_dns_la_SOURCES = \ + src/resolve/resolved-dns-dnssec.c \ + src/resolve/resolved-dns-dnssec.h \ + src/resolve/resolved-dns-packet.c \ + src/resolve/resolved-dns-packet.h \ + src/resolve/resolved-dns-rr.c \ + src/resolve/resolved-dns-rr.h \ + src/resolve/resolved-dns-answer.c \ + src/resolve/resolved-dns-answer.h \ + src/resolve/resolved-dns-question.c \ + src/resolve/resolved-dns-question.h \ + src/resolve/dns-type.c \ + src/resolve/dns-type.h + tests += \ test-dns-packet \ test-resolve-tables \ @@ -51,6 +66,7 @@ test_resolve_tables_CFLAGS = \ $(GCRYPT_CFLAGS) test_resolve_tables_LDADD = \ + libbasic-dns.la \ libsystemd-shared.la \ $(GCRYPT_LIBS) \ -lm @@ -66,7 +82,7 @@ test_dns_packet_CFLAGS = \ $(GCRYPT_CFLAGS) test_dns_packet_LDADD = \ - libsystemd-shared.la \ + libbasic-dns.la \ $(GCRYPT_LIBS) \ -lm @@ -91,6 +107,7 @@ test_dnssec_CFLAGS = \ $(GCRYPT_CFLAGS) test_dnssec_LDADD = \ + libbasic-dns.la \ libsystemd-shared.la \ $(GCRYPT_LIBS) \ -lm @@ -103,7 +120,8 @@ test_dnssec_complex_SOURCES = \ test_dnssec_complex_LDADD = \ libsystemd-shared.la -gperf_txt_sources += \ - src/resolve/dns_type-list.txt +noinst_LTLIBRARIES = libbasic-dns.la +libbasic_dns_la_LIBADD = libshared.la +$(outdir)/dns-type.lo: $(outdir)/dns_type-from-name.h $(outdir)/dns_type-to-name.h include $(topsrcdir)/build-aux/Makefile.tail.mk |