Makefile revision 1.21
1# $NetBSD: Makefile,v 1.21 2003/03/13 05:00:28 thorpej 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 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_CONFIG_H \ 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= config.log config.status confdefs.h *.stamp 39 40# Get components of Berkeley DB. 41_CURDIR:= ${.CURDIR} 42.CURDIR:= ${_CURDIR}/../../lib/libc 43.include "${.CURDIR}/db/Makefile.inc" 44.CURDIR:= ${_CURDIR} 45 46SRCS:= ${SRCS:Nndbm.c} 47 48config.cache: include/.stamp configure config.h.in defs.mk.in 49 rm -f ${.TARGET} 50 CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \ 51 sh ${.CURDIR}/configure --cache-file=config.cache 52 53defs.mk: config.cache 54 @touch ${.TARGET} 55 56# Run by hand, then "configure" script committed: 57regen: 58 cd ${.CURDIR} && ${TOOLDIR}/bin/nbautoconf 59 60include/.stamp: 61 mkdir -p include/sys include/machine include/rpc 62 @touch ${.TARGET} 63 64cleandir: compat.clean 65compat.clean: 66 -rm -r -f include 67 -rm -f config.cache config.h 68 69HOST_CPPFLAGS:= ${CPPFLAGS} 70CPPFLAGS:= # empty 71 72.include <bsd.hostlib.mk> 73