1 # $NetBSD: Makefile,v 1.22 2003/03/14 03:38:42 thorpej Exp $ 2 3 HOSTLIB= nbcompat 4 5 SRCS= 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 16 BUILD_OSTYPE!= uname -s 17 18 # Disable use of pre-compiled headers on Darwin. 19 .if ${BUILD_OSTYPE} == "Darwin" 20 CPPFLAGS+= -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 26 CPPFLAGS+= -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 37 DPSRCS+= defs.mk 38 CLEANFILES= 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 46 SRCS:= ${SRCS:Nndbm.c} 47 48 config.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 53 defs.mk: config.cache 54 @touch ${.TARGET} 55 56 # Run by hand, then "configure" script committed: 57 regen: 58 cd ${.CURDIR} && ${TOOLDIR}/bin/nbautoconf 59 60 include/.stamp: 61 mkdir -p include/sys include/machine include/rpc 62 @touch ${.TARGET} 63 64 cleandir: compat.clean 65 compat.clean: 66 -rm -r -f include 67 -rm -f config.cache config.h 68 69 HOST_CPPFLAGS:= ${CPPFLAGS} 70 CPPFLAGS:= # empty 71 72 .include <bsd.hostlib.mk> 73