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