# RCSid:
#       $Id: Makefile,v 1.14 2009/12/25 07:27:14 sjg Exp $
#
#       @(#) Copyright (c) 1995-2009 Simon J. Gerraty
#
#       This file is provided in the hope that it will
#       be of use.  There is absolutely NO WARRANTY.
#       Permission to copy, redistribute or otherwise
#       use this file is hereby granted provided that 
#       the above copyright notice and this notice are
#       left intact. 
#      
#       Please send copies of changes and bug-fixes to:
#       sjg@crufty.net
#

all depend: config.h 

# more or less as per the autoconf manual.

.if !empty(prefix)
CONFIGURE_ARGS += --prefix=${prefix}
.endif

config.h:	${.CURDIR}/config.h.in Makefile.inc.in config.status
	./config.status
.if exists(${.CURDIR}/../snmp/lib/snmp2/snmp_asn1.h) || exists(${.CURDIR}/../include/snmp_asn1.h)
	echo "#define HAVE_SNMP_H 1" >> config.h
.endif

CLEANFILES = \
	Makefile.inc \
	config.cache \
	config.h \
	config.log \
	config.status \
	stamp-h.in

.include "../Makefile.inc"
.include <obj.mk>
.include <subdir.mk>
.include <autoconf.mk>

clean:
	rm -f ${CLEANFILES}
	(cd ${.CURDIR} && rm -f ${CLEANFILES})
