summaryrefslogtreecommitdiff
path: root/src/grp-resolve/libbasic-dns
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-resolve/libbasic-dns')
-rw-r--r--src/grp-resolve/libbasic-dns/src/Makefile27
-rw-r--r--src/grp-resolve/libbasic-dns/test/Makefile3
2 files changed, 27 insertions, 3 deletions
diff --git a/src/grp-resolve/libbasic-dns/src/Makefile b/src/grp-resolve/libbasic-dns/src/Makefile
index 667dedf6bc..93d4c59345 100644
--- a/src/grp-resolve/libbasic-dns/src/Makefile
+++ b/src/grp-resolve/libbasic-dns/src/Makefile
@@ -23,16 +23,37 @@
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: $(call at.path,$(srcdir)/../include/basic-dns/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 }' <$< >$@
gperf_txt_sources += \
src/resolve/dns_type-list.txt
+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
+
+noinst_LTLIBRARIES = libbasic-dns.la
+libbasic_dns_la_LIBADD += \
+ libsystemd-gcrypt.la \
+ libsystemd-shared.la
+
+$(outdir)/dns-type.lo: $(outdir)/dns_type-from-name.h $(outdir)/dns_type-to-name.h
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/libbasic-dns/test/Makefile b/src/grp-resolve/libbasic-dns/test/Makefile
index 165f401d26..4f4cbd42a3 100644
--- a/src/grp-resolve/libbasic-dns/test/Makefile
+++ b/src/grp-resolve/libbasic-dns/test/Makefile
@@ -42,6 +42,7 @@ test_resolve_tables_CFLAGS = \
$(GCRYPT_CFLAGS)
test_resolve_tables_LDADD = \
+ libbasic-dns.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
-lm
@@ -57,6 +58,7 @@ test_dns_packet_CFLAGS = \
$(GCRYPT_CFLAGS)
test_dns_packet_LDADD = \
+ libbasic-dns.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
-lm
@@ -82,6 +84,7 @@ test_dnssec_CFLAGS = \
$(GCRYPT_CFLAGS)
test_dnssec_LDADD = \
+ libbasic-dns.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
-lm