Makefile revision 1.6
1#	$NetBSD: Makefile,v 1.6 2002/01/29 10:20:31 tv Exp $
2
3HOSTLIB=	nbcompat
4
5SRCS=		basename.c dirname.c fgetln.c flock.c fparseln.c \
6		getmode.c getopt_long.c pread.c pwcache.c pwrite.c \
7		pw_scan.c setenv.c setgroupent.c setpassent.c \
8		setprogname.c snprintf.c \
9		strlcat.c strlcpy.c strmode.c strsep.c unvis.c vis.c \
10		_err.c _errx.c _verr.c _verrx.c _vwarn.c _vwarnx.c \
11		_warn.c _warnx.c __fts13.c
12
13# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
14# other file ops, on many systems, without changing function names.
15
16CPPFLAGS+=	-I. -I./include -I${.CURDIR} -DHAVE_CONFIG_H -Dlint \
17		-D_FILE_OFFSET_BITS=64
18
19.PATH:		${.CURDIR}/../../lib/libc/gen \
20		${.CURDIR}/../../lib/libc/stdlib \
21		${.CURDIR}/../../lib/libc/string \
22		${.CURDIR}/../../lib/libutil \
23
24DPSRCS+=	defs.mk
25CLEANFILES=	config.log config.status confdefs.h includedir.stamp
26
27# Get components of Berkeley DB.
28_CURDIR:=	${.CURDIR}
29.CURDIR:=	${_CURDIR}/../../lib/libc
30.include "${.CURDIR}/db/Makefile.inc"
31.CURDIR:=	${_CURDIR}
32
33SRCS:=		${SRCS:Nndbm.c}
34
35defs.mk: includedir.stamp configure config.h.in defs.mk.in
36	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
37		sh ${.CURDIR}/configure --cache-file=config.cache
38	@touch $@
39
40# Run by hand, then "configure" script committed:
41regen:
42	cd ${.CURDIR} && ${TOOLDIR}/bin/nbautoconf
43
44includedir.stamp:
45	mkdir -p include/sys
46	@touch $@
47
48cleandir: compat.clean
49compat.clean:
50	-rm -r -f include
51	-rm -f config.cache config.h
52
53HOST_CPPFLAGS:=	${CPPFLAGS}
54CPPFLAGS:=	# empty
55
56.include <bsd.hostlib.mk>
57