Newer
Older
libkres_SOURCES := \
lib/layer/cookiemonster.c \
lib/layer/pktcache.c \
lib/cookies/control.c \
lib/dnssec/nsec.c \
lib/dnssec/nsec3.c \
lib/dnssec/signature.c \
lib/nsrep.c \
lib/cache.c \
lib/cdb_lmdb.c
libkres_HEADERS := \
lib/generic/array.h \
lib/generic/map.h \
lib/generic/set.h \
lib/cookies/control.h \
lib/dnssec/nsec.h \
lib/dnssec/nsec3.h \
lib/dnssec/signature.h \
lib/nsrep.h \
lib/cache.h \
lib/cdb.h \
lib/cdb_lmdb.h
libkres_DEPEND := $(contrib)
libkres_CFLAGS := -fvisibility=hidden -fPIC $(lmdb_CFLAGS)
libkres_LIBS := $(contrib_TARGET) $(libknot_LIBS) $(libdnssec_LIBS) $(lmdb_LIBS)
libkres_TARGET := -L$(abspath lib) -lkres
ifeq ($(BUILDMODE), static)
$(eval $(call make_static,libkres,lib,yes))
else
$(eval $(call make_lib,libkres,lib,yes,$(ABIVER)))
endif
# Generate pkg-config file
libkres.pc:
@echo 'prefix='$(PREFIX) > $@
@echo 'exec_prefix=$${prefix}' >> $@
@echo 'libdir='$(LIBDIR) >> $@
@echo 'includedir='$(INCLUDEDIR) >> $@
@echo 'Name: libkres' >> $@
@echo 'Description: Knot DNS Resolver library' >> $@
@echo 'Version: $(MAJOR).$(MINOR).$(PATCH)' >> $@
@echo 'Libs: -L$${libdir} -lkres' >> $@
@echo 'Cflags: -I$${includedir}' >> $@
libkres-pcinstall: libkres.pc libkres-install
$(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/
$(INSTALL) -m 644 $< $(DESTDIR)$(LIBDIR)/pkgconfig/
lib: $(libkres)
lib-install: libkres-install libkres-pcinstall
lib-clean: libkres-clean
.PHONY: lib lib-install lib-clean libkres.pc