xref: /openbsd-src/gnu/lib/libiberty/Makefile.bsd-wrapper (revision fc532a6e4f7ee2431443428250620cbc432d7fbb)
1#	$OpenBSD: Makefile.bsd-wrapper,v 1.20 2023/09/06 11:49:11 jca Exp $
2
3LIB=		iberty
4CPPFLAGS+=	-DHAVE_CONFIG_H -I$(.CURDIR)/src -I$(.CURDIR)/include -I$(.OBJDIR)
5CFLAGS+=	-std=gnu89
6XCFLAGS=	CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS}"
7
8HOST_FILES!=	cat $(.OBJDIR)/needed-list 2>/dev/null||true
9
10.PATH: ${.CURDIR}/src
11
12SRCS=		argv.c choose-temp.c concat.c cplus-dem.c cp-demangle.c \
13		cp-demint.c \
14		dyn-string.c fdmatch.c fopen_unlocked.c \
15		getopt.c getopt1.c getpwd.c getruntime.c \
16		hashtab.c hex.c fibheap.c partition.c \
17		floatformat.c make-temp-file.c make-relative-prefix.c \
18		md5.c objalloc.c obstack.c \
19		pex-common.c pex-unix.c pexecute.c \
20		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
34BUILDFIRST = needed-list
35
36needed-list: config.status
37	${MAKE} ${XCFLAGS} 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	${XCFLAGS} \
44	/bin/sh ${.CURDIR}/src/configure \
45		--prefix=/usr --with-local-prefix=/usr ${CF} \
46		&& touch config.status
47
48all:	libiberty.info
49
50libiberty.info:
51	makeinfo --no-split -I${.CURDIR}/src ${.CURDIR}/src/libiberty.texi
52
53afterinstall:
54	${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
55	    libiberty.info $(DESTDIR)/usr/share/info
56
57.include <bsd.lib.mk>
58