Commit f2b028e7 authored by Marek Vavruša's avatar Marek Vavruša

Merge branch 'build-changes-q2' into faster-request-proc

parents d5807047 feb3f648
......@@ -40,7 +40,7 @@ tmp*
/ylwrap
/doc/doxyxml
/doc/html
/daemon/kresolved
/daemon/kresd
/tests/test_array
/tests/test_map
/tests/test_module
......
......@@ -35,8 +35,8 @@ See the [Building project][depends] documentation page for more information.
The project builds a resolver library in the `lib` directory, and a daemon in the `daemon` directory.
```
$ ./daemon/kresolved -h
$ ./daemon/kresolved [working_directory]
$ ./daemon/kresd -h
$ ./daemon/kresd [working_directory]
```
See the documentation at [knot-resolver.readthedocs.org][doc].
......
# Project
MAJOR := 15
MINOR := 04
MINOR := 07
PATCH := 0
# Paths
......@@ -12,7 +12,7 @@ MODULEDIR := $(LIBDIR)/kdns_modules
# Tools
CC ?= cc
CFLAGS += -std=c99 -D_GNU_SOURCE -Wall -fPIC -I$(abspath .) -I$(abspath lib/generic) -I$(abspath contrib)
CFLAGS += -std=c99 -D_GNU_SOURCE -Wall -I$(abspath .) -I$(abspath lib/generic) -I$(abspath contrib)
CFLAGS += -DPACKAGE_VERSION="\"$(MAJOR).$(MINOR)\"" -DPREFIX="\"$(PREFIX)\"" -DMODULEDIR="\"$(MODULEDIR)\""
RM := rm -f
LN := ln -s
......
This diff is collapsed.
../licenses/LGPL2
\ No newline at end of file
/*
* UCW Library -- Generic allocators
*
* (c) 2014 Martin Mares <mj@ucw.cz>
*/
#ifndef _UCW_ALLOC_H
#define _UCW_ALLOC_H
/**
* This structure describes a generic allocator. It provides pointers
* to three functions, which handle the actual (re)allocations.
**/
struct ucw_allocator {
void * (*alloc)(struct ucw_allocator *alloc, size_t size);
void * (*realloc)(struct ucw_allocator *alloc, void *ptr, size_t old_size, size_t new_size);
void (*free)(struct ucw_allocator *alloc, void *ptr);
};
/* alloc-std.c */
/**
* [[std]]
* This allocator uses <<basics:xmalloc()>>, <<basics:xrealloc()>> and <<basics:xfree()>>. The memory
* it allocates is left unitialized.
**/
extern struct ucw_allocator ucw_allocator_std;
/**
* [[zeroing]]
* This allocator uses <<basics:xmalloc()>>, <<basics:xrealloc()>> and <<basics:xfree()>>. All memory
* is zeroed upon allocation.
**/
extern struct ucw_allocator ucw_allocator_zeroed;
#endif
/*
* UCW Library -- Configuration-Dependent Definitions
*
* (c) 1997--2012 Martin Mares <mj@ucw.cz>
* (c) 2006 Robert Spalek <robert@ucw.cz>
*
* This software may be freely distributed and used according to the terms
* of the GNU Lesser General Public License.
*/
#ifndef _UCW_CONFIG_H
#define _UCW_CONFIG_H
/* Default page size and pointer alignment */
#ifndef CPU_PAGE_SIZE
#define CPU_PAGE_SIZE 4096
#endif
#define CPU_STRUCT_ALIGN sizeof(void *)
/* Tell libc we're going to use all extensions available */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
/* Types (based on standard C99 integers) */
#include <stddef.h>
#include <stdint.h>
typedef uint8_t byte; /** Exactly 8 bits, unsigned **/
typedef uint8_t u8; /** Exactly 8 bits, unsigned **/
typedef int8_t s8; /** Exactly 8 bits, signed **/
typedef uint16_t u16; /** Exactly 16 bits, unsigned **/
typedef int16_t s16; /** Exactly 16 bits, signed **/
typedef uint32_t u32; /** Exactly 32 bits, unsigned **/
typedef int32_t s32; /** Exactly 32 bits, signed **/
typedef uint64_t u64; /** Exactly 64 bits, unsigned **/
typedef int64_t s64; /** Exactly 64 bits, signed **/
typedef unsigned int uint; /** A better pronounceable alias for `unsigned int` **/
typedef s64 timestamp_t; /** Milliseconds since an unknown epoch **/
// FIXME: This should be removed soon
typedef uint uns; /** Backwards compatible alias for `uint' ***/
#ifdef CONFIG_UCW_LARGE_FILES
typedef s64 ucw_off_t; /** File position (either 32- or 64-bit, depending on `CONFIG_UCW_LARGE_FILES`). **/
#else
typedef s32 ucw_off_t;
#endif
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -16,7 +16,7 @@ the `daemon` directory.
.. code-block:: bash
$ ./daemon/kresolved -h
$ ./daemon/kresd -h
Interacting with the daemon
---------------------------
......@@ -26,7 +26,7 @@ You can load modules this way and use their properties to get information about
.. code-block:: bash
$ kresolved /var/run/knot-resolver
$ kresd /var/run/knot-resolver
[system] started in interactive mode, type 'help()'
> cache.count()
53
......@@ -47,7 +47,7 @@ comfortable in the current working directory.
.. code-block:: sh
$ kresolved /var/run/kresolved
$ kresd /var/run/kresd
And you're good to go for most use cases! If you want to use modules or configure daemon behavior, read on.
......
kresolved_EMBED := \
kresd_EMBED := \
contrib/ccan/json/json.c
kresolved_SOURCES := \
$(kresolved_EMBED) \
kresd_SOURCES := \
$(kresd_EMBED) \
daemon/io.c \
daemon/network.c \
daemon/engine.c \
......@@ -16,18 +16,18 @@ daemon/engine.o: daemon/lua/sandbox.inc daemon/lua/config.inc
@$(call quiet,XXD,$<) $< > $@
# Dependencies
kresolved_DEPEND := $(libkresolve)
kresolved_LIBS := $(libkresolve_TARGET) $(libknot_LIBS) $(libuv_LIBS) $(lua_LIBS)
kresd_DEPEND := $(libkres)
kresd_LIBS := $(libkres_TARGET) $(libknot_LIBS) $(libuv_LIBS) $(lua_LIBS)
# Make binary
ifeq ($(HAS_lua)|$(HAS_libuv), yes|yes)
$(eval $(call make_bin,kresolved,daemon))
$(eval $(call make_bin,kresd,daemon))
endif
# Targets
daemon: $(kresolved)
daemon-install: kresolved-install
daemon-clean: kresolved-clean
daemon: $(kresd)
daemon-install: kresd-install
daemon-clean: kresd-clean
@$(RM) daemon/lua/*.inc
.PHONY: daemon daemon-install daemon-clean
......@@ -19,6 +19,7 @@
#include <getopt.h>
#include <uv.h>
#include <libknot/internal/sockaddr.h>
#include <ucw/mempool.h>
#include "lib/defines.h"
#include "lib/resolve.h"
......@@ -128,8 +129,10 @@ int main(int argc, char **argv)
uv_signal_start(&sigint, signal_handler, SIGINT);
/* Create a server engine. */
mm_ctx_t pool;
mm_ctx_mempool(&pool, MM_DEFAULT_BLKSIZE);
mm_ctx_t pool = {
.ctx = mp_new (4096),
.alloc = (mm_alloc_t) mp_alloc
};
struct engine engine;
ret = engine_init(&engine, &pool);
if (ret != 0) {
......
......@@ -17,7 +17,7 @@
#include <uv.h>
#include <libknot/packet/pkt.h>
#include <libknot/internal/net.h>
#include <libknot/internal/mempool.h>
#include <ucw/mempool.h>
#include "daemon/worker.h"
#include "daemon/engine.h"
......@@ -62,8 +62,10 @@ static int parse_query(knot_pkt_t *query)
static struct qr_task *qr_task_create(struct worker_ctx *worker, uv_handle_t *handle, knot_pkt_t *query, const struct sockaddr *addr)
{
mm_ctx_t pool;
mm_ctx_mempool(&pool, MM_DEFAULT_BLKSIZE);
mm_ctx_t pool = {
.ctx = mp_new (4096),
.alloc = (mm_alloc_t) mp_alloc
};
/* Create worker task */
struct engine *engine = worker->engine;
......
......@@ -11,8 +11,8 @@ if os.environ.get('READTHEDOCS', None) == 'True':
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'breathe']
# Breathe configuration
breathe_projects = { "libkresolve": "doxyxml" }
breathe_default_project = "libkresolve"
breathe_projects = { "libkres": "doxyxml" }
breathe_default_project = "libkres"
breathe_domain_by_extension = {"h" : "c"}
# The suffix of source filenames.
......@@ -66,7 +66,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'libkresolve', u'libkresolve documentation',
('index', 'libkres', u'libkres documentation',
[u'CZ.NIC Labs'], 1)
]
......@@ -15,9 +15,9 @@ Name resolution
---------------
.. doxygenfile:: resolve.h
:project: libkresolve
:project: libkres
.. doxygenfile:: rplan.h
:project: libkresolve
:project: libkres
.. _lib_api_cache:
......@@ -25,7 +25,7 @@ Cache
-----
.. doxygenfile:: cache.h
:project: libkresolve
:project: libkres
.. _lib_api_nameservers:
......@@ -33,9 +33,9 @@ Nameservers
-----------
.. doxygenfile:: nsrep.h
:project: libkresolve
:project: libkres
.. doxygenfile:: zonecut.h
:project: libkresolve
:project: libkres
.. _lib_api_modules:
......@@ -43,15 +43,15 @@ Modules
-------
.. doxygenfile:: module.h
:project: libkresolve
:project: libkres
Utilities
---------
.. doxygenfile:: utils.h
:project: libkresolve
:project: libkres
.. doxygenfile:: defines.h
:project: libkresolve
:project: libkres
.. _lib_generics:
......
......@@ -14,3 +14,4 @@ Implemented modules
.. include:: ../modules/cachectl/README.rst
.. include:: ../modules/graphite/README.rst
.. include:: ../modules/ketcd/README.rst
.. include:: ../modules/kmemcached/README.rst
......@@ -64,9 +64,9 @@ struct kr_cache_txn {
/**
* Open/create cache with provided storage options.
* @param cache cache structure to be initialized
* @param api Storage engine
* @param storage_opts Storage-specific options (may be NULL for default)
* @param mm Memory context.
* @param api storage engine API
* @param opts storage-specific options (may be NULL for default)
* @param mm memory context.
* @return 0 or an error code
*/
int kr_cache_open(struct kr_cache *cache, const namedb_api_t *api, void *opts, mm_ctx_t *mm);
......
......@@ -16,30 +16,30 @@ array
~~~~~
.. doxygenfile:: array.h
:project: libkresolve
:project: libkres
map
~~~
.. doxygenfile:: map.h
:project: libkresolve
:project: libkres
set
~~~
.. doxygenfile:: set.h
:project: libkresolve
:project: libkres
pack
~~~~
.. doxygenfile:: pack.h
:project: libkresolve
:project: libkres
lru
~~~
.. doxygenfile:: lru.h
:project: libkresolve
:project: libkres
.. _`Crit-bit tree`: http://cr.yp.to/critbit.html
......@@ -97,7 +97,7 @@ struct lru_hash_base {
char slots[];
};
/** @breif User-defined hashtable. */
/** @brief User-defined hashtable. */
#define lru_hash(type) \
struct { \
lru_hash_struct \
......@@ -155,9 +155,9 @@ static inline void *lru_slot_set(struct lru_hash_base *lru, const char *key, uin
* @param table hash table
* @param max_slots number of slots
*/
#define lru_init(table, max_size) \
(memset((table), 0, sizeof(*table) + (max_size) * sizeof((table)->slots[0])), \
(table)->stride = sizeof((table)->slots[0]), (table)->size = (max_size))
#define lru_init(table, max_slots) \
(memset((table), 0, sizeof(*table) + (max_slots) * sizeof((table)->slots[0])), \
(table)->stride = sizeof((table)->slots[0]), (table)->size = (max_slots))
/**
* @brief Free all keys and evict all values.
......
......@@ -33,6 +33,3 @@ int kr_response_classify(knot_pkt_t *pkt);
/** Make next iterative query. */
int kr_make_query(struct kr_query *query, knot_pkt_t *pkt);
/* Processing module implementation. */
const knot_layer_api_t *iterate_layer(struct kr_module *module);
/* Copyright (C) 2014 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "lib/layer.h"
/* Processing module implementation. */
const knot_layer_api_t *rrcache_layer(struct kr_module *module);
ccan_EMBED := \
contrib/ccan/ilog/ilog.c \
contrib/ccan/isaac/isaac.c \
contrib/ucw/mempool.c \
contrib/murmurhash3/murmurhash3.c
libkresolve_SOURCES := \
libkres_SOURCES := \
$(ccan_EMBED) \
lib/generic/map.c \
lib/layer/iterate.c \
......@@ -17,7 +18,7 @@ libkresolve_SOURCES := \
lib/rplan.c \
lib/cache.c
libkresolve_HEADERS := \
libkres_HEADERS := \
lib/generic/array.h \
lib/generic/map.h \
lib/generic/set.h \
......@@ -31,16 +32,16 @@ libkresolve_HEADERS := \
lib/cache.h
# Dependencies
libkresolve_DEPEND :=
libkresolve_LIBS := $(libknot_LIBS)
libkresolve_TARGET := -Wl,-rpath,lib -Llib -lkresolve
libkres_DEPEND :=
libkres_LIBS := $(libknot_LIBS)
libkres_TARGET := -Wl,-rpath,lib -Llib -lkres
# Make library
$(eval $(call make_lib,libkresolve,lib))
$(eval $(call make_static,libkres,lib))
# Targets
lib: $(libkresolve)
lib-install: libkresolve-install
lib-clean: libkresolve-clean
lib: $(libkres)
lib-install: libkres-install
lib-clean: libkres-clean
.PHONY: lib lib-install lib-clean
......@@ -23,11 +23,21 @@
#include "lib/utils.h"
#include "lib/module.h"
/* List of embedded modules */
const knot_layer_api_t *iterate_layer(struct kr_module *module);
const knot_layer_api_t *rrcache_layer(struct kr_module *module);
const knot_layer_api_t *pktcache_layer(struct kr_module *module);
static const struct kr_module embedded_modules[] = {
{ "iterate", NULL, NULL, NULL, iterate_layer, NULL, NULL, NULL },
{ "rrcache", NULL, NULL, NULL, rrcache_layer, NULL, NULL, NULL },
{ "pktcache", NULL, NULL, NULL, pktcache_layer, NULL, NULL, NULL },
};
/** Library extension. */
#if defined(__APPLE__)
#define LIBEXT ".dylib"
#elif _WIN32
#define LIBEXT ".lib"
#define LIBEXT ".dll"
#else
#define LIBEXT ".so"
#endif
......@@ -90,6 +100,18 @@ static int load_library(struct kr_module *module, const char *name, const char *
/** Load C module symbols. */
static int load_sym_c(struct kr_module *module, uint32_t api_required)
{
/* Check if it's embedded first */
for (unsigned i = 0; i < sizeof(embedded_modules)/sizeof(embedded_modules[0]); ++i) {
const struct kr_module *embedded = &embedded_modules[i];
if (strcmp(module->name, embedded->name) == 0) {
module->init = embedded->init;
module->deinit = embedded->deinit;
module->config = embedded->config;
module->layer = embedded->layer;
return kr_ok();
}
}
/* Load dynamic library module */
auto_free char *module_prefix = kr_strcatdup(2, module->name, "_");
ABI_CHECK(module, module_prefix, "api", api_required);
ABI_LOAD(module, module_prefix, "init", "deinit", "config", "layer", "props");
......
......@@ -16,12 +16,10 @@
#include <stdio.h>
#include <fcntl.h>
#include <libknot/internal/mempool.h>
#include <libknot/rrtype/rdname.h>
#include <libknot/descriptor.h>
#include <libknot/internal/net.h>
#include <ucw/mempool.h>
#include "lib/resolve.h"
#include "lib/layer.h"
#include "lib/rplan.h"
......@@ -265,8 +263,10 @@ int kr_resolve(struct kr_context* ctx, knot_pkt_t *answer,
}
/* Create memory pool */
mm_ctx_t pool;
mm_ctx_mempool(&pool, MM_DEFAULT_BLKSIZE);
mm_ctx_t pool = {
.ctx = mp_new (KNOT_WIRE_MAX_PKTSIZE),
.alloc = (mm_alloc_t) mp_alloc
};
knot_pkt_t *query = knot_pkt_new(NULL, KNOT_EDNS_MAX_UDP_PAYLOAD, &pool);
knot_pkt_t *resp = knot_pkt_new(NULL, KNOT_WIRE_MAX_PKTSIZE, &pool);
if (!query || !resp) {
......
......@@ -59,8 +59,12 @@
* @code{.c}
*
* // Create request and its memory pool
* struct kr_request req;
* mm_ctx_mempool(&req.pool, 4096);
* struct kr_request req = {
* .pool = {
* .ctx = mp_new (4096),
* .alloc = (mm_alloc_t) mp_alloc
* }
* };
* kr_resolve_begin(&req, ctx, answer);
* int state = kr_resolve_query(&req, qname, qclass, qtype);
*
......
......@@ -314,7 +314,7 @@ Once you load the module, you can call the module property from the interactive
.. code-block:: bash
$ kresolved
$ kresd
...
[system] started in interactive mode, type 'help()'
> modules.load('cached')
......
cachectl_SOURCES := modules/cachectl/cachectl.c
cachectl_DEPEND := $(libkresolve)
cachectl_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS)
cachectl_DEPEND := $(libkres)
cachectl_LIBS := $(libkres_TARGET) $(libkres_LIBS)
$(call make_c_module,cachectl)
\ No newline at end of file
gostats_SOURCES := modules/gostats/gostats.go
gostats_DEPEND := $(libkresolve)
gostats_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS)
gostats_DEPEND := $(libkres)
gostats_LIBS := $(libkres_TARGET) $(libkres_LIBS)
$(call make_go_module,gostats)
\ No newline at end of file
......@@ -21,12 +21,12 @@
* The module provides an override for queried address records.
*/
#include <ccan/json/json.h>
#include <libknot/packet/pkt.h>
#include <libknot/descriptor.h>
#include <libknot/internal/lists.h>
#include <libknot/internal/mempool.h>
#include <libknot/rrtype/aaaa.h>
#include <ccan/json/json.h>
#include <ucw/mempool.h>
#include "lib/layer/iterate.h"
#include "lib/zonecut.h"
......@@ -171,8 +171,10 @@ static int load(struct kr_module *module, const char *path)
}
/* Create pool and copy itself */
mm_ctx_t _pool;
mm_ctx_mempool(&_pool, MM_DEFAULT_BLKSIZE);
mm_ctx_t _pool = {
.ctx = mp_new(4096),
.alloc = (mm_alloc_t) mp_alloc
};
mm_ctx_t *pool = mm_alloc(&_pool, sizeof(*pool));
if (!pool) {
return kr_error(ENOMEM);
......
hints_SOURCES := modules/hints/hints.c contrib/ccan/json/json.c
hints_DEPEND := $(libkresolve)
hints_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS)
hints_DEPEND := $(libkres)
hints_LIBS := $(libkres_TARGET) $(libkres_LIBS)
$(call make_c_module,hints)
\ No newline at end of file
......@@ -4,16 +4,16 @@ Etcd module
-----------
The module connects to Etcd peers and watches for configuration change.
By default, the module looks for the subtree under ``/kresolved`` directory,
By default, the module looks for the subtree under ``/kresd`` directory,
but you can change this `in the configuration <https://github.com/mah0x211/lua-etcd#cli-err--etcdnew-optiontable->`_.
The subtree structure corresponds to the configuration variables in the declarative style.
.. code-block:: bash
$ etcdctl set /kresolved/net/127.0.0.1 53
$ etcdctl set /kresolved/modules/cachectl true
$ etcdctl set /kresolved/cache/size 10000000
$ etcdctl set /kresd/net/127.0.0.1 53
$ etcdctl set /kresd/modules/cachectl true
$ etcdctl set /kresd/cache/size 10000000
Configures all listening nodes to following configuration:
......@@ -30,7 +30,7 @@ Example configuration
modules = {
ketcd = {
prefix = '/kresolved',
prefix = '/kresd',
peer = 'http://127.0.0.1:7001'
}
}
......
......@@ -28,7 +28,7 @@ end
function ketcd.init(module)
ketcd.Etcd = require('etcd.luasocket')
ketcd.defaults = { prefix = '/kresolved' }
ketcd.defaults = { prefix = '/kresd' }
end
function ketcd.deinit(module)
......
Memcached cache storage
-----------------------
Module providing a cache storage backend for memcached_, which makes a good fit for
making a shared cache between resolvers.
After loading you can see the storage backend registered and useable.
.. code-block:: lua
> modules.load 'kmemcached'
> cache.backends()
[memcached://] => true
And you can use it right away, see the `libmemcached configuration`_ reference for configuration string
options, the most essential ones are `--SERVER` or `--SOCKET`. Here's an example for connecting to UNIX socket.
.. code-block:: lua
> cache.storage = 'memcached://--SOCKET="/var/sock/memcached"'
.. note:: The memcached_ instance **MUST** support binary protocol, in order to make it work with binary keys. You can pass other options to the configuration string for performance tuning.
.. warning:: The memcached_ server is responsible for evicting entries out of cache, the pruning function is not implemented, and neither is aborting write transactions.
Build resolver shared cache
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The memcached_ takes care of the data replication and fail over, you can add multiple servers at once.
.. code-block:: lua
> cache.storage = 'memcached://--SOCKET="/var/sock/memcached" --SERVER=192.168.1.1 --SERVER=cache2.domain'
Dependencies
^^^^^^^^^^^^
Depends on the libmemcached_ library.
.. _memcached: http://memcached.org/
.. _libmemcached: http://libmemcached.org/libMemcached.html
.. _`libmemcached configuration`: http://docs.libmemcached.org/libmemcached_configuration.html#description
kmemcached_SOURCES := modules/kmemcached/kmemcached.c modules/kmemcached/namedb_memcached.c
kmemcached_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS) $(libmemcached_LIBS)
kmemcached_LIBS := $(libkres_TARGET) $(libkres_LIBS) $(libmemcached_LIBS)
$(call make_c_module,kmemcached)
stats_SOURCES := modules/stats/stats.c contrib/ccan/json/json.c
stats_DEPEND := $(libkresolve)
stats_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS)
stats_DEPEND := $(libkres)
stats_LIBS := $(libkres_TARGET) $(libkres_LIBS)
$(call make_c_module,stats)
......@@ -4,8 +4,10 @@ CGO := go tool cgo
GCCGO := gccgo
LIBEXT := .so
MODEXT := $(LIBEXT)
AREXT := .a
LIBTYPE := shared
MODTYPE := shared
ARTYPE := static
BINEXT :=
PLATFORM = Linux
ifeq ($(OS),Windows_NT)
......@@ -51,7 +53,11 @@ define make_target
$$(eval $$(call make_objs,$(1)))
$(1) := $(2)/$(1)$(3)
$(2)/$(1)$(3): $$($(1)_OBJ) $$($(1)_DEPEND)
ifeq ($(4),-$(ARTYPE))
$(call quiet,AR,$$@) rcs $$@ $$($(1)_OBJ)
else
$(call quiet,CCLD,$$@) $(CFLAGS) $$($(1)_OBJ) -o $$@ $(4) $(LDFLAGS) $$($(1)_LIBS)
endif
$(1)-clean:
$(RM) $$($(1)_OBJ) $$($(1)_DEP) $(2)/$(1)$(3)
$(1)-install: $(2)/$(1)$(3)
......@@ -69,6 +75,7 @@ make_bin = $(call make_target,$(1),$(2),$(BINEXT),,$(BINDIR))
make_lib = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(LIBDIR))
make_module = $(call make_target,$(1),$(2),$(LIBEXT),-$(LIBTYPE),$(MODULEDIR))
make_shared = $(call make_target,$(1),$(2),$(MODEXT),-$(MODTYPE),$(LIBDIR))
make_static = $(call make_target,$(1),$(2),$(AREXT),-$(ARTYPE),$(LIBDIR))
# Evaluate library
define have_lib
......
......@@ -14,7 +14,7 @@ EXPOSE 53
# Select entrypoint
WORKDIR /data
CMD ["/usr/local/bin/kresolved"]
CMD ["/usr/local/bin/kresd"]
# Install dependencies and sources
RUN \
......
......@@ -5,7 +5,7 @@
# Mocked calls library
libmock_calls_SOURCES := tests/mock_calls.c
libmock_calls_LIBS := $(tests_LIBS) $(python_LIBS)
libmock_calls_DEPEND := $(libkresolve)
libmock_calls_DEPEND := $(libkres)
$(eval $(call make_lib,libmock_calls,tests))
# Python module for tests
......
......@@ -14,8 +14,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.