1#	$OpenBSD: Makefile.bsd-wrapper,v 1.13 2010/09/04 14:39:05 miod Exp $
2
3LIB=		iberty
4CPPFLAGS+=	-DHAVE_CONFIG_H -I$(.CURDIR)/src -I$(.CURDIR)/include -I$(.OBJDIR)
5
6NOLINT=
7
8HOST_FILES!=	cat $(.OBJDIR)/needed-list 2>/dev/null||true
9
10.PATH: ${.CURDIR}/src
11
12# XXX remove oldhashtab.c once gcc 2.95 is no longer used
13SRCS=		argv.c choose-temp.c concat.c cplus-dem.c cp-demangle.c \
14		cp-demint.c \
15		dyn-string.c fdmatch.c fopen_unlocked.c \
16		getopt.c getopt1.c getpwd.c getruntime.c \
17		hashtab.c hex.c fibheap.c partition.c \
18		floatformat.c make-temp-file.c make-relative-prefix.c \
19		md5.c objalloc.c obstack.c oldhashtab.c pex-common.c \
20		pex-unix.c pexecute.c regex.c safe-ctype.c spaces.c splay-tree.c \
21		strerror.c strsignal.c strverscmp.c \
22		xatexit.c xexit.c xmalloc.c xmemdup.c xstrerror.c xstrdup.c \
23		physmem.c lbasename.c lrealpath.c unlink-if-ordinary.c \
24		$(HOST_FILES)
25
26# XXX -- These files are generated during the PREREQ variable assignment.
27CLEANFILES+=	config.h config.status needed-list
28
29# and more
30CLEANFILES+=	Makefile config.cache config.log stamp-h xhost-mkfrag \
31		testsuite/Makefile libiberty.info
32
33
34depend:	needed-list
35
36needed-list: config.status
37	${MAKE} ${GNUCFLAGS} CC=${CC} needed-list
38
39config.status: Makefile.in configure
40	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
41	INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
42	MAKEINFO='makeinfo --no-split' \
43	/bin/sh ${.CURDIR}/src/configure \
44		--prefix=/usr --with-local-prefix=/usr ${CF} \
45		&& touch config.status
46
47all:	libiberty.info
48
49libiberty.info:
50	makeinfo --no-split -I${.CURDIR}/src ${.CURDIR}/src/libiberty.texi
51
52afterinstall:
53	${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
54	    libiberty.info $(DESTDIR)/usr/share/info
55
56.include <bsd.lib.mk>
57