Skip to content
Snippets Groups Projects
Commit a496bd17 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

build: ported to libknot-2.0-pre API, no depends yet

parent d7683e53
Branches
Tags
No related merge requests found
......@@ -15,6 +15,7 @@ endif
# Dependencies
$(eval $(call find_lib,libknot))
$(eval $(call find_lib,libknot-int))
$(eval $(call find_lib,libuv))
$(eval $(call find_lib,cmocka))
$(eval $(call find_python))
......@@ -24,4 +25,4 @@ CFLAGS += $(libknot_CFLAGS) $(libuv_CFLAGS) $(cmocka_CFLAGS) $(python_CFLAGS)
include help.mk
include lib/libkresolve.mk
include daemon/kresolved.mk
include tests/tests.mk
\ No newline at end of file
include tests/tests.mk
info:
$(info )
$(info Target: Knot DNS Resolver $(MAJOR).$(MINOR)-$(PLATFORM))
$(info Compiler: $(CC))
$(info CFLAGS: $(CFLAGS))
$(info LDFLAGS: $(LDFLAGS))
$(info Compiler: $(CC) $(CFLAGS))
$(info Linker: $(LD) $(LDFLAGS))
$(info PREFIX: $(PREFIX))
$(info BINDIR: $(BINDIR))
$(info LIBDIR: $(LIBDIR))
......@@ -12,7 +11,8 @@ info:
$(info Features)
$(info --------)
$(info [$(HAS_libknot)] library (libknot))
$(info [$(HAS_libknot-int)] library (libknot-int))
$(info [$(HAS_libuv)] daemon (libuv))
$(info [$(HAS_cmocka)] unit tests (libcmocka))
$(info [$(HAS_python)] integration tests (libpython))
$(info )
\ No newline at end of file
$(info )
......@@ -22,7 +22,6 @@
#include <libknot/internal/mempattern.h>
#include <libknot/internal/namedb/namedb_lmdb.h>
#include <libknot/dnssec/random.h>
#include <libknot/errcode.h>
#include <libknot/descriptor.h>
......
......@@ -19,7 +19,7 @@
#include <libknot/descriptor.h>
#include <libknot/rrtype/rdname.h>
#include <libknot/processing/requestor.h>
#include <libknot/dnssec/random.h>
#include <dnssec/random.h>
#include "lib/layer/iterate.h"
#include "lib/resolve.h"
......@@ -287,7 +287,7 @@ static int prepare_query(knot_layer_t *ctx, knot_pkt_t *pkt)
return KNOT_NS_PROC_FAIL;
}
query->id = knot_random_uint16_t();
query->id = dnssec_random_uint16_t();
knot_wire_set_id(pkt->wire, query->id);
/* Declare EDNS0 support. */
......
......@@ -19,7 +19,7 @@
#include <libknot/internal/mempool.h>
#include <libknot/processing/requestor.h>
#include <libknot/descriptor.h>
#include <libknot/dnssec/random.h>
#include <dnssec/random.h>
#include "lib/resolve.h"
#include "lib/defines.h"
......
......@@ -14,7 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libknot/dnssec/random.h>
#include <dnssec/random.h>
#include <libknot/descriptor.h>
#include <libknot/rrtype/rdname.h>
#include <libknot/packet/wire.h>
......@@ -62,7 +62,7 @@ int kr_init_zone_cut(struct kr_zonecut *cut)
return KNOT_EINVAL;
}
const unsigned hint_id = knot_random_uint16_t() % HINT_COUNT;
const unsigned hint_id = dnssec_random_uint16_t() % HINT_COUNT;
const struct hint_info *hint = &SBELT[hint_id];
kr_set_zone_cut(cut, KR_DNAME_ROOT, hint->name);
......
......@@ -2,7 +2,6 @@
set -e
CMOCKA_TAG="cmocka-0.4.1"
URCU_TAG="v0.8.6"
LIBUV_TAG="v1.3.0"
KNOT_TAG="master"
......@@ -30,16 +29,6 @@ if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
pip install --user ${USER} -r ${PIP_PKGS}
fi
# liburcu
if [ ! -e ${PREFIX}/include/urcu.h ]; then
git clone -b ${URCU_TAG} git://git.urcu.so/userspace-rcu.git || true
cd userspace-rcu
./bootstrap
./configure --prefix=${PREFIX} --disable-dependency-tracking --disable-rpath
( make ${MAKEOPTS} ; make install ) || true
cd ..
fi
# libknot
if [ ! -e ${PREFIX}/include/libknot ]; then
git clone -b ${KNOT_TAG} https://github.com/CZNIC-Labs/knot.git || true
......@@ -49,7 +38,8 @@ if [ ! -e ${PREFIX}/include/libknot ]; then
export libcrypto_CFLAGS="-I /usr/local/opt/openssl/include"
export libcrypto_LIBS="-L/usr/local/opt/openssl/lib -lcrypto"
fi
./configure --prefix=${PREFIX} --with-lmdb=no --disable-fastparser --disable-dependency-tracking
./configure --prefix=${PREFIX} --with-lmdb=no --disable-fastparser --disable-dependency-tracking \
--disable-daemon --disable-utilities --disable-documentation
make ${MAKEOPTS} && make install
cd ..
fi
......@@ -58,7 +48,7 @@ fi
if [ ! -e ${PREFIX}/include/cmocka.h ]; then
git clone -b ${CMOCKA_TAG} git://git.cryptomilk.org/projects/cmocka.git || true
cd cmocka
mkdir build
mkdir build || true
cd build
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} ..
make ${MAKEOPTS} && make install
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment