DragonFly BSD
DragonFly kernel List (threaded) for 2006-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: How to compile lib/libisc ? (Work in progress: updating to BIND 9.3.2)


From: Petr Janda <elekktretterr@xxxxxxxxxxxxxx>
Date: Mon, 26 Jun 2006 19:17:03 +1000

Im attaching my current libisc/libbind Makefiles. So if anyone who's not too busy wants to have a look at it... and help me out.

Ive also re-created the libbind/dns_ho.c patch for 9.3.2 if anyone wonders why its still there.


# $FreeBSD: src/lib/libisc/Makefile,v 1.1.2.6 2002/07/22 14:21:49 ru Exp $
# $DragonFly: src/lib/libisc/Makefile,v 1.7 2005/04/21 13:42:33 joerg Exp $

BIND_DIR=	${.CURDIR}/../../contrib/bind-9.3.2

.include "${.CURDIR}/../../usr.sbin/named/Makefile.inc"
.include "${BIND_DIR}/lib/isc/api"

LIB=		isc
SHLIB_MAJOR=	2

.PATH:		${BIND_DIR}/lib
SRCS+=		isc/nls/msgcat.c

SRCS+=		isc/unix/app.c isc/unix/dir.c isc/unix/entropy.c \
		isc/unix/errno2result.c isc/unix/file.c isc/unix/fsaccess.c \
		isc/unix/interfaceiter.c isc/unix/keyboard.c isc/unix/net.c \
		isc/unix/os.c isc/unix/resource.c isc/unix/socket.c \
		isc/unix/stdio.c isc/unix/stdtime.c isc/unix/strerror.c \
		isc/unix/syslog.c isc/unix/time.c

SRCS+=		isc/assertions.c isc/base64.c isc/bitstring.c isc/buffer.c \
		isc/bufferlist.c isc/commandline.c isc/error.c isc/event.c \
		isc/hash.c isc/heap.c isc/hex.c isc/hmacmd5.c \
		isc/inet_pton.c \
		isc/lex.c isc/lfsr.c isc/lib.c isc/log.c \
		isc/md5.c isc/mem.c isc/mutexblock.c isc/netaddr.c isc/netscope.c \
		isc/ondestroy.c isc/quota.c isc/random.c \
		isc/ratelimiter.c isc/result.c isc/rwlock.c \
		isc/serial.c isc/sha1.c isc/sockaddr.c isc/string.c \
		isc/symtab.c isc/task.c isc/taskpool.c isc/timer.c \
		isc/version.c

SRCS+=		isccfg/version.c isccfg/log.c isccfg/parser.c \
		isccfg/namedconf.c

SRCS+=		dns/acl.c dns/adb.c dns/byaddr.c \
		dns/cache.c dns/callbacks.c dns/compress.c \
		dns/db.c dns/dbiterator.c dns/dbtable.c dns/diff.c \
		dns/dispatch.c dns/dnssec.c dns/forward.c dns/journal.c \
		dns/keytable.c dns/lib.c dns/log.c dns/lookup.c \
		dns/master.c dns/masterdump.c dns/message.c \
		dns/name.c dns/ncache.c dns/nsec.c dns/peer.c dns/portlist.c \
		dns/rbt.c dns/rbtdb.c dns/rbtdb64.c dns/rcode.c dns/rdata.c \
		dns/rdatalist.c dns/rdataset.c dns/rdatasetiter.c \
		dns/rdataslab.c dns/request.c dns/resolver.c dns/result.c \
		dns/rootns.c dns/sdb.c dns/soa.c dns/ssu.c \
		dns/stats.c dns/tcpmsg.c dns/time.c dns/timer.c dns/tkey.c \
		dns/tsig.c dns/ttl.c dns/validator.c \
		dns/version.c dns/view.c dns/xfrin.c dns/zone.c \
		dns/zonekey.c dns/zt.c

SRCS+=		dns/dst_api.c dns/dst_lib.c \
		dns/dst_parse.c dns/dst_result.c \
		dns/gssapi_link.c dns/gssapictx.c \
		dns/hmac_link.c dns/key.c \
		dns/openssl_link.c dns/openssldh_link.c \
		dns/openssldsa_link.c dns/opensslrsa_link.c

SRCS+=		isccc/alist.c isccc/base64.c isccc/cc.c isccc/ccmsg.c \
		isccc/lib.c isccc/result.c isccc/sexpr.c isccc/symtab.c \
		isccc/version.c

SRCS+=		lwres/context.c lwres/gai_strerror.c lwres/getaddrinfo.c \
		lwres/gethost.c lwres/getipnode.c lwres/getnameinfo.c \
		lwres/getrrset.c lwres/herror.c lwres/lwbuffer.c \
		lwres/lwconfig.c lwres/lwpacket.c lwres/lwresutil.c \
		lwres/lwres_gabn.c lwres/lwres_gnba.c lwres/lwres_grbn.c \
		lwres/lwres_noop.c lwres/lwinetaton.c lwres/lwinetpton.c \
		lwres/lwinetntop.c lwres/print.c lwres/strtoul.c

# contrib/bind/include/* must not override any real system includes
CFLAGS+=	-I${.CURDIR}/../../usr.sbin/named
CFLAGS+=	-I${.CURDIR}/../../usr.sbin/named/include

CFLAGS+=	-Wall -Wmissing-prototypes

CFLAGS+=	-DLIBINTERFACE=${LIBINTERFACE} \
		-DLIBREVISION=${LIBREVISION} \
		-DLIBAGE=${LIBAGE}

HEADERS =	app.h assertions.h base64.h bitstring.h boolean.h buffer.h \
		bufferlist.h commandline.h entropy.h error.h event.h \
		eventclass.h \
		file.h formatcheck.h fsaccess.h heap.h hex.h hmacmd5.h \
		interfaceiter.h ipv6.h lang.h lex.h \
		lfsr.h lib.h list.h log.h magic.h md5.h mem.h msgcat.h msgs.h \
		mutexblock.h netaddr.h netscope.h ondestroy.h os.h \
		parseint.h platform.h print.h quota.h random.h ratelimiter.h \
		refcount.h region.h resource.h \
		result.h resultclass.h rwlock.h serial.h sha1.h sockaddr.h \
		socket.h stdio.h stdlib.h string.h symtab.h task.h taskpool.h timer.h \
		types.h util.h version.h

INCS=		${HEADERS:S/^/${BIND_DIR}\/lib\/isc\/include\/isc\//g}
INCS+=           ${HEADERS:S/^/${BIND_DIR}\/lib\/isc\/unix\/include\/isc\//g}
INCSDIR=	${INCLUDEDIR}/isc

# there are a lot of duplicate names in the libraries we are combining,
# give each library its own subdirectory.
#
beforedepend: isc isccc dns isc/nls isc/unix isccfg lwres

isc isccc dns isc/nls isc/unix isccfg lwres:
		mkdir -p ${.TARGET}
.ORDER: isc isc/nls isc/unix

.ORDER: dns

CLEANDIRS+=	isc isccc dns isc/nls isc/unix isccfg lwres

#MAN=		assertions.3 bitncmp.3 eventlib.3 heap.3 \
#		logging.3 memcluster.3 tree.3
#CLEANFILES+=	${MAN}

#MLINKS+=	assertions.3 ENSURE.3 \
#		assertions.3 ENSURE_ERR.3 \
#		assertions.3 INSIST.3 \
#		assertions.3 INSIST_ERR.3 \
#		assertions.3 INVARIANT.3 \
#		assertions.3 INVARIANT_ERR.3 \
#		assertions.3 REQUIRE.3 \
#		assertions.3 REQUIRE_ERR.3 \
#		assertions.3 assertion_type_to_text.3 \
#		assertions.3 set_assertion_failure_callback.3 \
#		eventlib.3 evAddTime.3 \
#		eventlib.3 evCancelConn.3 \
#		eventlib.3 evCancelRW.3 \
#		eventlib.3 evClearIdleTimer.3 \
#		eventlib.3 evClearTimer.3 \
#		eventlib.3 evCmpTime.3 \
#		eventlib.3 evConnFunc.3 \
#		eventlib.3 evConnect.3 \
#		eventlib.3 evConsIovec.3 \
#		eventlib.3 evConsTime.3 \
#		eventlib.3 evCreate.3 \
#		eventlib.3 evDefer.3 \
#		eventlib.3 evDeselectFD.3 \
#		eventlib.3 evDestroy.3 \
#		eventlib.3 evDispatch.3 \
#		eventlib.3 evDo.3 \
#		eventlib.3 evDrop.3 \
#		eventlib.3 evFileFunc.3 \
#		eventlib.3 evGetNext.3 \
#		eventlib.3 evHold.3 \
#		eventlib.3 evInitID.3 \
#		eventlib.3 evLastEventTime.3 \
#		eventlib.3 evListen.3 \
#		eventlib.3 evMainLoop.3 \
#		eventlib.3 evNowTime.3 \
#		eventlib.3 evPrintf.3 \
#		eventlib.3 evRead.3 \
#		eventlib.3 evResetTimer.3 \
#		eventlib.3 evSelectFD.3 \
#		eventlib.3 evSetDebug.3 \
#		eventlib.3 evSetIdleTimer.3 \
#		eventlib.3 evSetTimer.3 \
#		eventlib.3 evStreamFunc.3 \
#		eventlib.3 evSubTime.3 \
#		eventlib.3 evTestID.3 \
#		eventlib.3 evTimeRW.3 \
#		eventlib.3 evTimeSpec.3 \
#		eventlib.3 evTimeVal.3 \
#		eventlib.3 evTimerFunc.3 \
#		eventlib.3 evTouchIdleTimer.3 \
#		eventlib.3 evTryAccept.3 \
#		eventlib.3 evUnhold.3 \
#		eventlib.3 evUntimeRW.3 \
#		eventlib.3 evUnwait.3 \
#		eventlib.3 evWaitFor.3 \
#		eventlib.3 evWaitFunc.3 \
#		eventlib.3 evWrite.3 \
#		heap.3 heap_decreased.3 \
#		heap.3 heap_delete.3 \
#		heap.3 heap_element.3 \
#		heap.3 heap_for_each.3 \
#		heap.3 heap_free.3 \
#		heap.3 heap_increased.3 \
#		heap.3 heap_insert.3 \
#		heap.3 heap_new.3 \
#		logging.3 log_add_channel.3 \
#		logging.3 log_category_is_active.3 \
#		logging.3 log_close_stream.3 \
#		logging.3 log_dec_references.3 \
#		logging.3 log_free_channel.3 \
#		logging.3 log_free_context.3 \
#		logging.3 log_get_filename.3 \
#		logging.3 log_get_stream.3 \
#		logging.3 log_inc_references.3 \
#		logging.3 log_new_context.3 \
#		logging.3 log_new_file_channel.3 \
#		logging.3 log_new_null_channel.3 \
#		logging.3 log_new_syslog_channel.3 \
#		logging.3 log_open_stream.3 \
#		logging.3 log_option.3 \
#		logging.3 log_remove_channel.3 \
#		logging.3 log_set_file_owner.3 \
#		logging.3 log_vwrite.3 \
#		logging.3 log_write.3 \
#		memcluster.3 memget.3 \
#		memcluster.3 memput.3 \
#		memcluster.3 memstats.3 \
#		tree.3 tree_add.3 \
#		tree.3 tree_delete.3 \
#		tree.3 tree_init.3 \
#		tree.3 tree_mung.3 \
#		tree.3 tree_srch.3 \
#		tree.3 tree_trav.3

.include <bsd.lib.mk>

# This has to come after the .include <bsd.lib.mk>. Not sure why.

.SUFFIXES:	.mdoc .3
.mdoc.3:
		sed -e 's/@INDOT@//g' \
		    -e 's/@SYSCALL_EXT@/2/g' \
		    -e 's/@SYS_OPS_EXT@/8/g' \
		    < ${.ALLSRC} > ${.TARGET}

# $FreeBSD: src/lib/libbind/Makefile,v 1.5.2.2 2002/07/19 18:46:25 ru Exp $
# $DragonFly: src/lib/libbind/Makefile,v 1.8 2006/01/18 02:33:32 dillon Exp $

BIND_DIR=${.CURDIR}/../../contrib/bind-9.3.2

# note: lib/bind/include/isc/list.h must come before lib/isc/include/isc/list.h
#
CFLAGS+= -I${.CURDIR}/../../usr.sbin/named \
	-I${.CURDIR}/../../usr.sbin/named/include \
	-I${BIND_DIR}/lib/bind/include

.include "${.CURDIR}/../../usr.sbin/named/Makefile.inc"
.include "${BIND_DIR}/lib/bind/api"

LIB= bind
WANT_IRS= for now

# This may or may not work yet.  It's not compatible with the core
# system components since it overrides the master.passwd handling etc.
.if defined(WANT_IRS)
.PATH:	${BIND_DIR}/lib/bind/irs
SRCS+=	dns.c dns_gr.c dns_ho.c dns_nw.c dns_pr.c dns_pw.c \
        dns_sv.c gai_strerror.c gen.c gen_gr.c gen_ho.c \
        gen_ng.c gen_nw.c gen_pr.c gen_pw.c gen_sv.c \
        getaddrinfo.c getgrent.c gethostent.c \
        getnameinfo.c getnetent.c getnetent_r.c \
        getnetgrent.c getprotoent.c getpwent.c getservent.c \
        hesiod.c irp.c irp_gr.c irp_ho.c irp_ng.c irp_nw.c \
        irp_pr.c irp_pw.c irp_sv.c irpmarshall.c irs_data.c \
        lcl.c lcl_gr.c lcl_ho.c lcl_ng.c lcl_nw.c lcl_pr.c \
        lcl_pw.c lcl_sv.c nis.c nis_gr.c nis_ho.c nis_ng.c \
        nis_nw.c nis_pr.c nis_pw.c nis_sv.c nul_ng.c \
        util.c getgrent_r.c gethostent_r.c getnetgrent_r.c getprotoent_r.c \
        getpwent_r.c getservent_r.c

# kind of a messy way to patch this file
#
CONTRIBDIR= ${BIND_DIR}/lib/bind/irs
CFLAGS+=-I${CONTRIBDIR}

SRCS+=	dns_ho.c.patch

.PATH:	${BIND_DIR}/lib/bind/nameser
SRCS+=	ns_date.c ns_name.c ns_netint.c \
	ns_parse.c ns_print.c  ns_samedomain.c \
	ns_sign.c ns_ttl.c ns_verify.c

.PATH:	${BIND_DIR}/lib/bind/resolv
SRCS+=	herror.c mtctxres.c  res_comp.c res_data.c \
	res_debug.c res_findzonecut.c res_init.c \
	res_mkquery.c res_mkupdate.c res_query.c \
	res_send.c res_sendsigned.c res_update.c

.endif

.PATH:	${BIND_DIR}/lib/bind/dst
CFLAGS+=-DHMAC_MD5 -DUSE_MD5
SRCS+=	dst_api.c hmac_link.c md5_dgst.c support.c

.PATH:	${BIND_DIR}/lib/bind/isc
SRCS+=	assertions.c base64.c bitncmp.c ctl_clnt.c \
	ctl_p.c ctl_srvr.c ev_connects.c ev_files.c \
	ev_streams.c ev_timers.c ev_waits.c \
	eventlib.c heap.c hex.c logging.c \
	memcluster.c movefile.c tree.c

.PATH:	${BIND_DIR}/lib/bind/bsd
SRCS+=	daemon.c ftruncate.c gettimeofday.c mktemp.c putenv.c \
        readv.c setenv.c setitimer.c strcasecmp.c strdup.c \
        strerror.c strpbrk.c strsep.c strtoul.c utimes.c \
        writev.c

INTERNALLIB=		true

.include <bsd.lib.mk>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]