Home | History | Annotate | Line # | Download | only in compat
Makefile revision 1.54.6.5
      1  1.54.6.5      yamt #	$NetBSD: Makefile,v 1.54.6.5 2014/05/22 11:42:30 yamt Exp $
      2       1.1        tv 
      3       1.1        tv HOSTLIB=	nbcompat
      4       1.1        tv 
      5  1.54.6.4      yamt .include <bsd.own.mk>
      6  1.54.6.4      yamt 
      7  1.54.6.3      yamt SRCS=		atoll.c basename.c cdbr.c cdbw.c dirname.c \
      8  1.54.6.5      yamt 		dprintf.c fgetln.c flock.c fparseln.c fpurge.c \
      9  1.54.6.3      yamt 		getcap.c getline.c getmode.c getopt_long.c gettemp.c \
     10  1.54.6.1      yamt 		heapsort.c \
     11      1.39      elad 		issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
     12      1.54       roy 		md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
     13      1.54       roy 		mi_vector_hash.c mkdtemp.c \
     14      1.22   thorpej 		mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
     15      1.51     lukem 		pw_scan.c \
     16      1.51     lukem 		raise_default_signal.c rmd160.c rmd160hl.c \
     17      1.51     lukem 		setenv.c setgroupent.c \
     18      1.34      elad 		setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
     19  1.54.6.5      yamt 		sha256hl.c sha384hl.c sha512hl.c snprintb.c snprintf.c \
     20  1.54.6.5      yamt 		stat_flags.c strlcat.c strlcpy.c strmode.c \
     21  1.54.6.5      yamt 		strndup.c strnlen.c \
     22  1.54.6.5      yamt 		strsep.c strsuftoll.c strtoll.c \
     23  1.54.6.5      yamt 		unvis.c vis.c err.c errx.c errc.c verr.c verrx.c verrc.c \
     24  1.54.6.5      yamt 		vwarn.c vwarnx.c vwarnc.c warn.c warnx.c warnc.c \
     25  1.54.6.5      yamt 		fts.c glob.c efun.c
     26      1.21   thorpej 
     27      1.21   thorpej BUILD_OSTYPE!=  uname -s
     28      1.21   thorpej 
     29      1.21   thorpej # Disable use of pre-compiled headers on Darwin.
     30      1.21   thorpej .if ${BUILD_OSTYPE} == "Darwin"
     31      1.21   thorpej CPPFLAGS+=	-no-cpp-precomp
     32      1.21   thorpej .endif
     33       1.6        tv 
     34       1.6        tv # -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
     35       1.6        tv # other file ops, on many systems, without changing function names.
     36       1.6        tv 
     37      1.47    dogcow CPPFLAGS+=	-I. -I./include -I${.CURDIR} -I${.CURDIR}/sys \
     38      1.47    dogcow 		-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
     39       1.3        tv 
     40  1.54.6.3      yamt .PATH:		${.CURDIR}/../../lib/libc/cdb \
     41  1.54.6.3      yamt 		${.CURDIR}/../../lib/libc/gen \
     42       1.9     bjh21 		${.CURDIR}/../../lib/libc/hash \
     43      1.39      elad 		${.CURDIR}/../../lib/libc/hash/md2 \
     44      1.38      elad 		${.CURDIR}/../../lib/libc/hash/md5 \
     45      1.38      elad 		${.CURDIR}/../../lib/libc/hash/rmd160 \
     46      1.38      elad 		${.CURDIR}/../../lib/libc/hash/sha1 \
     47      1.34      elad 		${.CURDIR}/../../lib/libc/hash/sha2 \
     48       1.9     bjh21 		${.CURDIR}/../../lib/libc/md \
     49      1.15   thorpej 		${.CURDIR}/../../lib/libc/stdio \
     50       1.6        tv 		${.CURDIR}/../../lib/libc/stdlib \
     51       1.4     lukem 		${.CURDIR}/../../lib/libc/string \
     52      1.44  christos 		${.CURDIR}/../../lib/libutil \
     53  1.54.6.5      yamt 		${.CURDIR}/../../common/lib/libc/cdb \
     54      1.40  christos 		${.CURDIR}/../../common/lib/libc/string \
     55      1.46       mrg 		${.CURDIR}/../../common/lib/libc/hash/rmd160 \
     56      1.40  christos 		${.CURDIR}/../../common/lib/libc/hash/sha1 \
     57      1.46       mrg 		${.CURDIR}/../../common/lib/libc/hash/sha2 \
     58      1.40  christos 		${.CURDIR}/../../common/lib/libc/md \
     59      1.45   thorpej 		${.CURDIR}/../../common/lib/libc/stdlib \
     60  1.54.6.5      yamt 		${.CURDIR}/../../common/lib/libutil \
     61  1.54.6.2      yamt 		${.CURDIR}/../../external/bsd/flex/dist
     62       1.1        tv 
     63       1.6        tv DPSRCS+=	defs.mk
     64      1.43  christos CLEANFILES+=	config.log config.status configure.lineno *.stamp
     65  1.54.6.4      yamt CLEANDIRFILES+=	defs.mk config.cache confdefs.h
     66       1.3        tv 
     67       1.3        tv # Get components of Berkeley DB.
     68       1.3        tv _CURDIR:=	${.CURDIR}
     69       1.3        tv .CURDIR:=	${_CURDIR}/../../lib/libc
     70       1.3        tv .include "${.CURDIR}/db/Makefile.inc"
     71       1.3        tv .CURDIR:=	${_CURDIR}
     72       1.3        tv 
     73      1.54       roy SRCS:=		${SRCS:M*.c}
     74       1.1        tv 
     75      1.42       wiz config.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
     76      1.20     lukem 	rm -f ${.TARGET}
     77       1.3        tv 	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
     78      1.27     lukem 		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
     79      1.20     lukem 
     80      1.20     lukem defs.mk: config.cache
     81      1.20     lukem 	@touch ${.TARGET}
     82       1.1        tv 
     83  1.54.6.4      yamt INCFILES=	nbtool_config.h
     84  1.54.6.4      yamt INCSUBDIRS=	sys machine rpc arpa
     85  1.54.6.4      yamt CLEANDIRFILES+= ${INCFILES}
     86  1.54.6.4      yamt 
     87  1.54.6.4      yamt # CLEANDIRFILES may not contain directory names
     88  1.54.6.4      yamt cleandir:	cleandir.include
     89  1.54.6.4      yamt cleandir.include: .PHONY
     90  1.54.6.4      yamt 		rm -rf include
     91       1.6        tv 
     92      1.13        tv include/.stamp:
     93  1.54.6.4      yamt 	mkdir -p ${INCSUBDIRS:@d@ include/$d @}
     94      1.20     lukem 	@touch ${.TARGET}
     95       1.6        tv 
     96  1.54.6.4      yamt # Install rules
     97  1.54.6.4      yamt 
     98  1.54.6.4      yamt HOST_LIBDIR=	${TOOLDIR}/lib
     99  1.54.6.4      yamt HOST_INCSDIR=	${TOOLDIR}/include
    100  1.54.6.4      yamt HOST_SHAREDIR= ${TOOLDIR}/share
    101  1.54.6.4      yamt 
    102  1.54.6.4      yamt install:	.PHONY install.lib includes install.defs.mk
    103  1.54.6.4      yamt 
    104  1.54.6.4      yamt # Install lib${HOSTLIB}.a in ${TOOLDIR}/lib
    105  1.54.6.4      yamt install.lib: .PHONY ${HOST_LIBDIR}/lib${HOSTLIB}.a
    106  1.54.6.4      yamt ${HOST_LIBDIR}/lib${HOSTLIB}.a: lib${HOSTLIB}.a
    107  1.54.6.4      yamt 	${_MKTARGET_INSTALL}
    108  1.54.6.4      yamt 	${HOST_INSTALL_DIR} ${HOST_LIBDIR}
    109  1.54.6.4      yamt 	${HOST_INSTALL_FILE} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
    110  1.54.6.4      yamt 
    111  1.54.6.4      yamt .for _f in ${INCFILES}
    112  1.54.6.4      yamt HOST_INCINSTFILES+= ${HOST_INCSDIR}/compat/${_f}
    113  1.54.6.4      yamt ${HOST_INCSDIR}/compat/${_f}: ${_f}
    114  1.54.6.4      yamt 	${_MKTARGET_INSTALL}
    115  1.54.6.4      yamt 	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
    116  1.54.6.4      yamt .endfor
    117  1.54.6.4      yamt 
    118  1.54.6.4      yamt .for _d in ${INCSUBDIRS}
    119  1.54.6.4      yamt HOST_INCINSTDIRS+= ${HOST_INCSDIR}/compat/${_d}
    120  1.54.6.4      yamt ${HOST_INCSDIR}/compat/${_d}:
    121  1.54.6.4      yamt 	${_MKTARGET_INSTALL}
    122  1.54.6.4      yamt 	${HOST_INSTALL_DIR} ${.TARGET}
    123  1.54.6.4      yamt .endfor
    124  1.54.6.4      yamt 
    125  1.54.6.4      yamt # Install include files in ${TOOLDIR}/include/compat
    126  1.54.6.4      yamt includes: .PHONY ${HOST_INCINSTDIRS} .WAIT ${HOST_INCINSTFILES}
    127  1.54.6.4      yamt 	@(cd include && find . -name '*.h' -print | while read f ; do \
    128  1.54.6.4      yamt 	    ${HOST_INSTALL_FILE} $$f ${HOST_INCSDIR}/compat/$$f ; \
    129  1.54.6.4      yamt 	done)
    130  1.54.6.4      yamt 
    131  1.54.6.4      yamt 
    132  1.54.6.4      yamt # Install defs.mk in ${TOOLDIR}/share/compat
    133  1.54.6.4      yamt install.defs.mk: .PHONY ${HOST_SHAREDIR}/compat/defs.mk
    134  1.54.6.4      yamt ${HOST_SHAREDIR}/compat/defs.mk: defs.mk
    135  1.54.6.4      yamt 	${_MKTARGET_INSTALL}
    136  1.54.6.4      yamt 	${HOST_INSTALL_DIR} ${HOST_SHAREDIR}
    137  1.54.6.4      yamt 	${HOST_INSTALL_DIR} ${HOST_SHAREDIR}/compat
    138  1.54.6.4      yamt 	${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
    139  1.54.6.4      yamt 
    140  1.54.6.4      yamt # bsd.hostlib.mk wants HOST_CPPFLAGS, not CPPFLAGS
    141       1.6        tv 
    142       1.6        tv HOST_CPPFLAGS:=	${CPPFLAGS}
    143       1.6        tv CPPFLAGS:=	# empty
    144       1.1        tv 
    145       1.1        tv .include <bsd.hostlib.mk>
    146  1.54.6.4      yamt 
    147  1.54.6.4      yamt # Use uninstalled copy of host-mkdep
    148  1.54.6.4      yamt HOST_MKDEP_OBJ!= cd ${.CURDIR}/../host-mkdep && ${PRINTOBJDIR}
    149  1.54.6.4      yamt HOST_MKDEP=	${HOST_MKDEP_OBJ}/host-mkdep
    150  1.54.6.4      yamt MKDEP=		${HOST_MKDEP}
    151  1.54.6.4      yamt 
    152  1.54.6.4      yamt # Use uninstalled copy of the install program
    153  1.54.6.4      yamt INSTALL_OBJ!=	cd ${NETBSDSRCDIR}/tools/binstall && ${PRINTOBJDIR}
    154  1.54.6.4      yamt INSTALL=	${INSTALL_OBJ}/xinstall
    155  1.54.6.4      yamt 
    156  1.54.6.4      yamt # Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
    157  1.54.6.4      yamt # configure.ac.  See more detailed instructions in configure.ac.
    158  1.54.6.4      yamt regen:
    159  1.54.6.4      yamt 	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
    160  1.54.6.4      yamt 	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoheader
    161