Home | History | Annotate | Line # | Download | only in compat
Makefile revision 1.54
      1 #	$NetBSD: Makefile,v 1.54 2010/02/03 15:34:44 roy Exp $
      2 
      3 HOSTLIB=	nbcompat
      4 
      5 SRCS=		atoll.c basename.c dirname.c fgetln.c flock.c fparseln.c \
      6 		fpurge.c getmode.c getopt_long.c gettemp.c heapsort.c \
      7 		issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
      8 		md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
      9 		mi_vector_hash.c mkdtemp.c \
     10 		mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
     11 		pw_scan.c \
     12 		raise_default_signal.c rmd160.c rmd160hl.c \
     13 		setenv.c setgroupent.c \
     14 		setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
     15 		sha256hl.c sha384hl.c sha512hl.c snprintf.c stat_flags.c \
     16 		strlcat.c strlcpy.c strmode.c strndup.c strsep.c strsuftoll.c \
     17 		strtoll.c unvis.c vis.c err.c errx.c verr.c verrx.c \
     18 		vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c
     19 
     20 BUILD_OSTYPE!=  uname -s
     21 
     22 # Disable use of pre-compiled headers on Darwin.
     23 .if ${BUILD_OSTYPE} == "Darwin"
     24 CPPFLAGS+=	-no-cpp-precomp
     25 .endif
     26 
     27 # -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
     28 # other file ops, on many systems, without changing function names.
     29 
     30 CPPFLAGS+=	-I. -I./include -I${.CURDIR} -I${.CURDIR}/sys \
     31 		-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
     32 
     33 .PATH:		${.CURDIR}/../../lib/libc/gen \
     34 		${.CURDIR}/../../lib/libc/hash \
     35 		${.CURDIR}/../../lib/libc/hash/md2 \
     36 		${.CURDIR}/../../lib/libc/hash/md5 \
     37 		${.CURDIR}/../../lib/libc/hash/rmd160 \
     38 		${.CURDIR}/../../lib/libc/hash/sha1 \
     39 		${.CURDIR}/../../lib/libc/hash/sha2 \
     40 		${.CURDIR}/../../lib/libc/md \
     41 		${.CURDIR}/../../lib/libc/stdio \
     42 		${.CURDIR}/../../lib/libc/stdlib \
     43 		${.CURDIR}/../../lib/libc/string \
     44 		${.CURDIR}/../../lib/libutil \
     45 		${.CURDIR}/../../common/lib/libc/string \
     46 		${.CURDIR}/../../common/lib/libc/hash/rmd160 \
     47 		${.CURDIR}/../../common/lib/libc/hash/sha1 \
     48 		${.CURDIR}/../../common/lib/libc/hash/sha2 \
     49 		${.CURDIR}/../../common/lib/libc/md \
     50 		${.CURDIR}/../../common/lib/libc/stdlib \
     51 		${.CURDIR}/../../usr.bin/lex
     52 
     53 DPSRCS+=	defs.mk
     54 CLEANFILES+=	config.log config.status configure.lineno *.stamp
     55 
     56 # Get components of Berkeley DB.
     57 _CURDIR:=	${.CURDIR}
     58 .CURDIR:=	${_CURDIR}/../../lib/libc
     59 .include "${.CURDIR}/db/Makefile.inc"
     60 .CURDIR:=	${_CURDIR}
     61 
     62 SRCS:=		${SRCS:M*.c}
     63 
     64 config.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
     65 	rm -f ${.TARGET}
     66 	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
     67 		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
     68 
     69 defs.mk: config.cache
     70 	@touch ${.TARGET}
     71 
     72 # Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
     73 # configure.ac.  See more detailed instructions in configure.ac.
     74 regen:
     75 	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
     76 	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoheader
     77 
     78 include/.stamp:
     79 	mkdir -p include/sys include/machine include/rpc include/arpa
     80 	@touch ${.TARGET}
     81 
     82 cleandir:
     83 	-rm -f nbtool_config.h confdefs.h defs.mk
     84 	-rm -r -f include
     85 	-rm -f config.cache
     86 
     87 HOST_CPPFLAGS:=	${CPPFLAGS}
     88 CPPFLAGS:=	# empty
     89 
     90 .include <bsd.hostlib.mk>
     91