2008-02-09 05:37:21 +03:00
|
|
|
# $NetBSD: Makefile,v 1.39 2008/02/09 02:37:22 mrg Exp $
|
2002-04-03 09:21:16 +04:00
|
|
|
#
|
|
|
|
|
2002-04-23 03:23:05 +04:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2002-04-03 09:21:16 +04:00
|
|
|
PROG= installboot
|
|
|
|
MAN= installboot.8
|
2006-02-18 17:54:53 +03:00
|
|
|
SRCS= installboot.c sum.c machines.c fstypes.c
|
|
|
|
|
|
|
|
|
|
|
|
ARCH_XLAT= amd64-i386.c news68k-news.c newsmips-news.c
|
|
|
|
ARCH_XLAT+= sun2-sun68k.c sun3-sun68k.c
|
|
|
|
|
|
|
|
.if !defined(SMALLPROG) && !defined(ARCH_FILES)
|
|
|
|
ARCH_FILES= alpha.c amiga.c ews4800mips.c hp300.c hp700.c i386.c
|
2006-09-02 01:47:21 +04:00
|
|
|
ARCH_FILES+= landisk.c macppc.c news.c next68k.c pmax.c
|
2006-02-18 17:54:53 +03:00
|
|
|
ARCH_FILES+= sparc.c sparc64.c sun68k.c vax.c x68k.c
|
|
|
|
.else
|
|
|
|
ARCH_FILES?= ${ARCH_XLAT:M${MACHINE}-*:S/${MACHINE}-//}
|
|
|
|
.if empty(ARCH_FILES)
|
|
|
|
ARCH_FILES= ${MACHINE}.c
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
SRCS+=${ARCH_FILES}
|
|
|
|
|
|
|
|
.if empty(ARCH_FILES:C/(macppc|news|sparc|sun68k|x68k)/stg2/:Mstg2.c)
|
|
|
|
CPPFLAGS += -DNO_STAGE2
|
|
|
|
.else
|
|
|
|
SRCS+= bbinfo.c
|
|
|
|
|
|
|
|
# fstypes are only needed for 'stage2' and then only from bbinfo.
|
|
|
|
SRCS+= ffs.c
|
|
|
|
.if SMALLPROG
|
|
|
|
CPPFLAGS+= -DNO_FFS_SWAP
|
|
|
|
.else
|
|
|
|
SRCS+= ffs_bswap.c
|
|
|
|
.endif
|
2008-02-02 20:01:03 +03:00
|
|
|
#SRCS+= ext2fs.c ext2fs_bswap.c
|
2006-02-18 17:54:53 +03:00
|
|
|
.endif
|
2002-04-03 09:21:16 +04:00
|
|
|
|
|
|
|
WARNS?= 3
|
|
|
|
|
2002-04-26 20:23:14 +04:00
|
|
|
UFSSRC= ${NETBSDSRCDIR}/sys/ufs
|
2002-04-22 21:17:35 +04:00
|
|
|
CPPFLAGS+= -I${.CURDIR} -I.
|
2008-02-02 20:01:03 +03:00
|
|
|
.PATH: ${.CURDIR}/arch ${UFSSRC}/ffs ${UFSSRC}/ext2fs
|
2002-04-03 13:09:01 +04:00
|
|
|
|
2006-05-12 05:18:25 +04:00
|
|
|
.if !defined(HOSTPROGNAME)
|
2006-05-12 03:16:28 +04:00
|
|
|
.if ${HAVE_GCC} == 4
|
|
|
|
.for f in i386 macppc
|
|
|
|
COPTS.${f}.c+= -Wno-pointer-sign
|
|
|
|
.endfor
|
|
|
|
.endif
|
2006-05-12 05:18:25 +04:00
|
|
|
.endif
|
2006-05-12 03:16:28 +04:00
|
|
|
|
2002-04-03 09:21:16 +04:00
|
|
|
.include <bsd.prog.mk>
|