1 # $NetBSD: Makefile,v 1.7 2002/01/31 22:43:45 tv Exp $ 2 3 HOSTLIB= nbcompat 4 5 SRCS= basename.c dirname.c fgetln.c flock.c fparseln.c \ 6 getmode.c getopt_long.c libyywrap.c pread.c \ 7 pwcache.c pwrite.c pw_scan.c setenv.c \ 8 setgroupent.c setpassent.c 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 16 CPPFLAGS+= -I. -I./include -I${.CURDIR} -DHAVE_CONFIG_H \ 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 ${.CURDIR}/../../usr.bin/lex 24 25 DPSRCS+= defs.mk 26 CLEANFILES= config.log config.status confdefs.h *.stamp 27 28 # Get components of Berkeley DB. 29 _CURDIR:= ${.CURDIR} 30 .CURDIR:= ${_CURDIR}/../../lib/libc 31 .include "${.CURDIR}/db/Makefile.inc" 32 .CURDIR:= ${_CURDIR} 33 34 SRCS:= ${SRCS:Nndbm.c} 35 36 defs.mk: include.stamp configure config.h.in defs.mk.in 37 CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \ 38 sh ${.CURDIR}/configure --cache-file=config.cache 39 @touch $@ 40 41 # Run by hand, then "configure" script committed: 42 regen: 43 cd ${.CURDIR} && ${TOOLDIR}/bin/nbautoconf 44 45 include.stamp: 46 mkdir -p include/sys include/machine 47 @touch $@ 48 49 cleandir: compat.clean 50 compat.clean: 51 -rm -r -f include 52 -rm -f config.cache config.h 53 54 HOST_CPPFLAGS:= ${CPPFLAGS} 55 CPPFLAGS:= # empty 56 57 .include <bsd.hostlib.mk> 58