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