1# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 2# 3# SPDX-License-Identifier: MPL-2.0 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, you can obtain one at https://mozilla.org/MPL/2.0/. 8# 9# See the COPYRIGHT file distributed with this work for additional 10# information regarding copyright ownership. 11 12srcdir = @srcdir@ 13VPATH = @srcdir@ 14top_srcdir = @top_srcdir@ 15 16VERSION=@BIND9_VERSION@ 17 18@BIND9_MAKE_INCLUDES@ 19 20CINCLUDES = -I${srcdir}/unix/include \ 21 -I${srcdir}/pthreads/include \ 22 -I./include \ 23 -I${srcdir}/include \ 24 -I${srcdir} \ 25 ${DNS_INCLUDES} \ 26 ${OPENSSL_CFLAGS} \ 27 ${JSON_C_CFLAGS} \ 28 ${LIBXML2_CFLAGS} \ 29 ${LIBUV_CFLAGS} \ 30 ${ZLIB_CFLAGS} 31CDEFINES = 32CWARNINGS = 33 34# Alphabetically 35UNIXOBJS = unix/pk11_api.@O@ \ 36 unix/dir.@O@ unix/errno.@O@ \ 37 unix/errno2result.@O@ unix/file.@O@ unix/fsaccess.@O@ \ 38 unix/interfaceiter.@O@ unix/meminfo.@O@ \ 39 unix/net.@O@ unix/os.@O@ unix/resource.@O@ unix/socket.@O@ \ 40 unix/stdio.@O@ unix/stdtime.@O@ \ 41 unix/syslog.@O@ unix/time.@O@ 42 43THREADOBJS = pthreads/condition.@O@ pthreads/mutex.@O@ pthreads/thread.@O@ 44 45WIN32OBJS = win32/condition.@O@ win32/dir.@O@ win32/errno.@O@ \ 46 win32/file.@O@ win32/fsaccess.@O@ \ 47 win32/meminfo.@O@ win32/once.@O@ \ 48 win32/stdtime.@O@ win32/thread.@O@ win32/time.@O@ 49 50# Alphabetically 51OBJS = pk11.@O@ pk11_result.@O@ \ 52 aes.@O@ app.@O@ assertions.@O@ astack.@O@ \ 53 backtrace.@O@ base32.@O@ base64.@O@ \ 54 bind9.@O@ buffer.@O@ bufferlist.@O@ \ 55 commandline.@O@ counter.@O@ crc64.@O@ error.@O@ entropy.@O@ \ 56 event.@O@ hash.@O@ ht.@O@ heap.@O@ hex.@O@ \ 57 hmac.@O@ httpd.@O@ iterated_hash.@O@ \ 58 lex.@O@ lfsr.@O@ lib.@O@ log.@O@ \ 59 managers.@O@ md.@O@ mem.@O@ mutexblock.@O@ \ 60 netmgr/netmgr.@O@ netmgr/tcp.@O@ netmgr/udp.@O@ \ 61 netmgr/tcpdns.@O@ \ 62 netmgr/uverr2result.@O@ netmgr/uv-compat.@O@ \ 63 netaddr.@O@ netscope.@O@ nonce.@O@ openssl_shim.@O@ pool.@O@ \ 64 parseint.@O@ portset.@O@ quota.@O@ \ 65 radix.@O@ random.@O@ ratelimiter.@O@ \ 66 region.@O@ regex.@O@ result.@O@ rwlock.@O@ \ 67 safe.@O@ serial.@O@ siphash.@O@ sockaddr.@O@ stats.@O@ \ 68 string.@O@ symtab.@O@ task.@O@ taskpool.@O@ tls.@O@ \ 69 trampoline.@O@ \ 70 url.@O@ utf8.@O@ tm.@O@ timer.@O@ version.@O@ \ 71 ${UNIXOBJS} ${THREADOBJS} 72SYMTBLOBJS = backtrace-emptytbl.@O@ 73 74# Alphabetically 75SRCS = pk11.c pk11_result.c \ 76 aes.c app.c assertions.c astack.c \ 77 backtrace.c base32.c base64.c bind9.c \ 78 buffer.c bufferlist.c commandline.c counter.c crc64.c \ 79 entropy.c error.c event.c hash.c ht.c heap.c \ 80 hex.c hmac.c httpd.c iterated_hash.c \ 81 lex.c lfsr.c lib.c log.c \ 82 managers.c md.c mem.c mutexblock.c \ 83 netaddr.c netscope.c nonce.c openssl_shim.c pool.c \ 84 parseint.c portset.c quota.c radix.c random.c \ 85 ratelimiter.c region.c regex.c result.c rwlock.c \ 86 safe.c serial.c siphash.c sockaddr.c stats.c string.c \ 87 symtab.c task.c taskpool.c timer.c tls.c \ 88 trampoline.c \ 89 url.c utf8.c tm.c version.c 90 91LIBS = ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBUV_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} @LIBS@ 92 93# Note: the order of SUBDIRS is important. 94# Attempt to disable parallel processing. 95.NOTPARALLEL: 96.NO_PARALLEL: 97SUBDIRS = include netmgr unix pthreads 98TARGETS = timestamp 99TESTDIRS = @UNITTESTS@ 100 101@BIND9_MAKE_RULES@ 102 103version.@O@: version.c 104 ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ 105 -DVERSION=\"${VERSION}\" \ 106 -c ${srcdir}/version.c 107 108libisc.@SA@: ${OBJS} ${SYMTBLOBJS} 109 ${AR} ${ARFLAGS} $@ ${OBJS} ${SYMTBLOBJS} 110 ${RANLIB} $@ 111 112libisc-nosymtbl.@SA@: ${OBJS} 113 ${AR} ${ARFLAGS} $@ ${OBJS} 114 ${RANLIB} $@ 115 116libisc.la: ${OBJS} ${SYMTBLOBJS} 117 ${LIBTOOL_MODE_LINK} \ 118 ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc.la -rpath ${libdir} \ 119 -release "${VERSION}" \ 120 ${OBJS} ${SYMTBLOBJS} ${LIBS} 121 122libisc-nosymtbl.la: ${OBJS} 123 ${LIBTOOL_MODE_LINK} \ 124 ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc-nosymtbl.la -rpath ${libdir} \ 125 -release "${VERSION}" \ 126 ${OBJS} ${LIBS} 127 128timestamp: libisc.@A@ libisc-nosymtbl.@A@ 129 touch timestamp 130 131testdirs: libisc.@A@ libisc-nosymtbl.@A@ 132 133installdirs: 134 $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} 135 136install:: timestamp installdirs 137 ${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} libisc.@A@ ${DESTDIR}${libdir} 138 139uninstall:: 140 ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/libisc.@A@ 141 142clean distclean:: 143 rm -f libisc.@A@ libisc-nosymtbl.@A@ libisc.la \ 144 libisc-nosymtbl.la timestamp 145