Home | History | Annotate | Line # | Download | only in installboot
Makefile revision 1.52
      1 #	$NetBSD: Makefile,v 1.52 2019/05/07 05:02:42 thorpej Exp $
      2 #
      3 
      4 .include <bsd.own.mk>
      5 
      6 PROG=	installboot
      7 MAN=	installboot.8
      8 SRCS=	installboot.c sum.c machines.c fstypes.c
      9 
     10 ARCH_XLAT= amd64-i386.c news68k-news.c newsmips-news.c
     11 ARCH_XLAT+= sun2-sun68k.c sun3-sun68k.c
     12 
     13 .if !defined(SMALLPROG) && !defined(ARCH_FILES)
     14 ARCH_FILES=  alpha.c amiga.c
     15 ARCH_FILES+= emips.c evbarm.c ews4800mips.c
     16 ARCH_FILES+= hp300.c hppa.c
     17 ARCH_FILES+= i386.c
     18 ARCH_FILES+= landisk.c
     19 ARCH_FILES+= macppc.c
     20 ARCH_FILES+= news.c next68k.c
     21 ARCH_FILES+= pmax.c
     22 ARCH_FILES+= sparc.c sparc64.c sun68k.c
     23 ARCH_FILES+= vax.c
     24 ARCH_FILES+= x68k.c
     25 .else
     26 ARCH_FILES?= ${ARCH_XLAT:M${MACHINE}-*:S/${MACHINE}-//}
     27 .if empty(ARCH_FILES)
     28 ARCH_FILES= ${MACHINE}.c
     29 .endif
     30 .endif
     31 
     32 SRCS+=${ARCH_FILES}
     33 
     34 .if !empty(ARCH_FILES:C/(evbarm)/evboard/:Mevboard.c)
     35 SRCS+=evboards.c
     36 .endif
     37 
     38 .if !empty(ARCH_FILES:C/(evbarm)/fdt/:Mfdt.c)
     39 FDTDIR=		${.CURDIR}/../../sys/external/bsd/libfdt/dist
     40 .PATH:		${FDTDIR}
     41 CPPFLAGS+=	-DSUPPORT_FDT -I${FDTDIR}
     42 SRCS+=fdt.c fdt_ro.c fdt_strerror.c
     43 # XXX libfdt has some sign-comparison issues
     44 COPTS.fdt.c+=		-Wno-error=sign-compare
     45 COPTS.fdt_ro.c+=	-Wno-error=sign-compare
     46 COPTS.fdt_strerror.c+=	-Wno-error=sign-compare
     47 .endif
     48 
     49 
     50 .if !defined(HOSTPROGNAME)
     51 .if !empty(ARCH_FILES:C/(evbarm)/ofw/:Mofw.c)
     52 CPPFLAGS+=	-DSUPPORT_OPENFIRMWARE
     53 .endif
     54 .endif
     55 
     56 .if empty(ARCH_FILES:C/(macppc|news|sparc|sun68k|x68k)/stg2/:Mstg2.c)
     57 CPPFLAGS+=	-DNO_STAGE2
     58 .else
     59 SRCS+= bbinfo.c
     60 
     61 # fstypes are only needed for 'stage2' and then only from bbinfo.
     62 SRCS+= ffs.c
     63 .if SMALLPROG
     64 CPPFLAGS+=	-DNO_FFS_SWAP
     65 .else
     66 SRCS+= ffs_bswap.c
     67 .endif
     68 #SRCS+= ext2fs.c ext2fs_bswap.c
     69 .endif
     70 
     71 UFSSRC=		${NETBSDSRCDIR}/sys/ufs
     72 CPPFLAGS+=	-I${.CURDIR} -I.
     73 .PATH:		${.CURDIR}/arch ${UFSSRC}/ffs ${UFSSRC}/ext2fs
     74 
     75 .if !defined(HOSTPROGNAME)
     76 .for f in i386 macppc
     77 COPTS.${f}.c+=  -Wno-pointer-sign
     78 .endfor
     79 
     80 .if !empty(SRCS:Mevboards.c)
     81 LDADD+=	-lprop
     82 DPADD+=	${LIBPROP}
     83 .endif
     84 
     85 LDADD+= -lutil
     86 DPADD+= ${LIBUTIL}
     87 .endif
     88 
     89 CWARNFLAGS.clang+=	-Wno-error=address-of-packed-member
     90 
     91 .include <bsd.prog.mk>
     92