summaryrefslogtreecommitdiff
path: root/src/grp-resolve/libbasic-dns/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-resolve/libbasic-dns/Makefile')
-rw-r--r--src/grp-resolve/libbasic-dns/Makefile32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/grp-resolve/libbasic-dns/Makefile b/src/grp-resolve/libbasic-dns/Makefile
index 3e48f2a326..1d342c5f3b 100644
--- a/src/grp-resolve/libbasic-dns/Makefile
+++ b/src/grp-resolve/libbasic-dns/Makefile
@@ -23,18 +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
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(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
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(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
- $(AM_V_at)$(MKDIR_P) $(dir $@)
+$(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 +63,7 @@ test_resolve_tables_SOURCES = \
src/shared/test-tables.h
test_resolve_tables_LDADD = \
+ libbasic-dns.la \
libshared.la
test_dns_packet_SOURCES = \
@@ -62,6 +75,7 @@ test_dns_packet_CPPFLAGS = \
-DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
test_dns_packet_LDADD = \
+ libbasic-dns.la \
libshared.la
EXTRA_DIST += \
@@ -82,6 +96,7 @@ test_dnssec_SOURCES = \
$(basic_dns_sources)
test_dnssec_LDADD = \
+ libbasic-dns.la \
libshared.la
test_dnssec_complex_SOURCES = \
@@ -92,7 +107,8 @@ test_dnssec_complex_SOURCES = \
test_dnssec_complex_LDADD = \
libshared.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