Makefile revision 1.31
1# $NetBSD: Makefile,v 1.31 2004/06/20 22:20:15 jmc Exp $ 2 3HOSTLIB= nbcompat 4 5SRCS= atoll.c 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 putc_unlocked.c pwcache.c pwrite.c \ 10 pw_scan.c rmd160.c rmd160hl.c setenv.c setgroupent.c \ 11 setpassent.c setprogname.c sha1.c sha1hl.c snprintf.c \ 12 strlcat.c strlcpy.c strmode.c strsep.c strsuftoll.c \ 13 strtoll.c unvis.c vis.c _err.c _errx.c _verr.c _verrx.c \ 14 _vwarn.c _vwarnx.c _warn.c _warnx.c __fts13.c __glob13.c 15 16BUILD_OSTYPE!= uname -s 17 18# Disable use of pre-compiled headers on Darwin. 19.if ${BUILD_OSTYPE} == "Darwin" 20CPPFLAGS+= -no-cpp-precomp 21.endif 22 23# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and 24# other file ops, on many systems, without changing function names. 25 26CPPFLAGS+= -I. -I./include -I${.CURDIR} -DHAVE_NBTOOL_CONFIG_H=1 \ 27 -D_FILE_OFFSET_BITS=64 28 29.PATH: ${.CURDIR}/../../lib/libc/gen \ 30 ${.CURDIR}/../../lib/libc/hash \ 31 ${.CURDIR}/../../lib/libc/md \ 32 ${.CURDIR}/../../lib/libc/stdio \ 33 ${.CURDIR}/../../lib/libc/stdlib \ 34 ${.CURDIR}/../../lib/libc/string \ 35 ${.CURDIR}/../../usr.bin/lex 36 37DPSRCS+= defs.mk 38CLEANFILES+= defs.mk 39CLEANFILES+= config.log config.status configure.lineno confdefs.h *.stamp 40 41# Get components of Berkeley DB. 42_CURDIR:= ${.CURDIR} 43.CURDIR:= ${_CURDIR}/../../lib/libc 44.include "${.CURDIR}/db/Makefile.inc" 45.CURDIR:= ${_CURDIR} 46 47SRCS:= ${SRCS:Nndbm.c:N__ndbm13.c} 48 49config.cache: include/.stamp configure nbtool_config.h.in defs.mk.in 50 rm -f ${.TARGET} 51 CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \ 52 ${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache 53 54defs.mk: config.cache 55 @touch ${.TARGET} 56 57# Run by hand, then "configure" script committed: 58regen: 59 cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf 60 61include/.stamp: 62 mkdir -p include/sys include/machine include/rpc 63 @touch ${.TARGET} 64 65cleandir: compat.clean 66compat.clean: 67 -rm -r -f include 68 -rm -f config.cache nbtool_config.h 69 70HOST_CPPFLAGS:= ${CPPFLAGS} 71CPPFLAGS:= # empty 72 73.include <bsd.hostlib.mk> 74