1 1.61 thorpej # $NetBSD: Makefile,v 1.61 2025/10/05 21:18:29 thorpej 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.52 thorpej ARCH_FILES= alpha.c amiga.c 15 1.60 tsutsui ARCH_FILES+= evbarm.c evbmips.c ews4800mips.c 16 1.52 thorpej ARCH_FILES+= hp300.c hppa.c 17 1.52 thorpej ARCH_FILES+= i386.c 18 1.52 thorpej ARCH_FILES+= landisk.c 19 1.52 thorpej ARCH_FILES+= macppc.c 20 1.52 thorpej ARCH_FILES+= news.c next68k.c 21 1.52 thorpej ARCH_FILES+= pmax.c 22 1.61 thorpej ARCH_FILES+= riscv.c 23 1.52 thorpej ARCH_FILES+= sparc.c sparc64.c sun68k.c 24 1.52 thorpej ARCH_FILES+= vax.c 25 1.52 thorpej ARCH_FILES+= x68k.c 26 1.34 dsl .else 27 1.34 dsl ARCH_FILES?= ${ARCH_XLAT:M${MACHINE}-*:S/${MACHINE}-//} 28 1.34 dsl .if empty(ARCH_FILES) 29 1.34 dsl ARCH_FILES= ${MACHINE}.c 30 1.34 dsl .endif 31 1.54 martin COPTS.machines.c+= -DSINGLE_ARCH=ib_mach_${MACHINE} 32 1.34 dsl .endif 33 1.34 dsl 34 1.34 dsl SRCS+=${ARCH_FILES} 35 1.34 dsl 36 1.61 thorpej .if !empty(ARCH_FILES:C/(evbarm|evbmips|riscv)/evboard/:Mevboard.c) 37 1.52 thorpej SRCS+=evboards.c 38 1.52 thorpej .endif 39 1.52 thorpej 40 1.61 thorpej .if !empty(ARCH_FILES:C/(evbarm|evbmips|riscv)/fdt/:Mfdt.c) 41 1.52 thorpej FDTDIR= ${.CURDIR}/../../sys/external/bsd/libfdt/dist 42 1.52 thorpej .PATH: ${FDTDIR} 43 1.52 thorpej CPPFLAGS+= -DSUPPORT_FDT -I${FDTDIR} 44 1.52 thorpej SRCS+=fdt.c fdt_ro.c fdt_strerror.c 45 1.52 thorpej # XXX libfdt has some sign-comparison issues 46 1.52 thorpej COPTS.fdt.c+= -Wno-error=sign-compare 47 1.52 thorpej COPTS.fdt_ro.c+= -Wno-error=sign-compare 48 1.52 thorpej COPTS.fdt_strerror.c+= -Wno-error=sign-compare 49 1.52 thorpej .endif 50 1.52 thorpej 51 1.52 thorpej 52 1.52 thorpej .if !defined(HOSTPROGNAME) 53 1.61 thorpej .if !empty(ARCH_FILES:C/(evbarm|evbmips|riscv)/ofw/:Mofw.c) 54 1.52 thorpej CPPFLAGS+= -DSUPPORT_OPENFIRMWARE 55 1.52 thorpej .endif 56 1.52 thorpej .endif 57 1.52 thorpej 58 1.34 dsl .if empty(ARCH_FILES:C/(macppc|news|sparc|sun68k|x68k)/stg2/:Mstg2.c) 59 1.52 thorpej CPPFLAGS+= -DNO_STAGE2 60 1.34 dsl .else 61 1.34 dsl SRCS+= bbinfo.c 62 1.34 dsl 63 1.34 dsl # fstypes are only needed for 'stage2' and then only from bbinfo. 64 1.34 dsl SRCS+= ffs.c 65 1.34 dsl .if SMALLPROG 66 1.34 dsl CPPFLAGS+= -DNO_FFS_SWAP 67 1.34 dsl .else 68 1.34 dsl SRCS+= ffs_bswap.c 69 1.34 dsl .endif 70 1.38 tsutsui #SRCS+= ext2fs.c ext2fs_bswap.c 71 1.34 dsl .endif 72 1.1 lukem 73 1.59 tsutsui .if !empty(ARCH_FILES:C/(hp300|macppc)/cd9660/:Mcd9660.c) && \ 74 1.59 tsutsui !defined(SMALLPROG) 75 1.59 tsutsui CPPFLAGS+= -DSUPPORT_CD9660 76 1.59 tsutsui SRCS+= cd9660.c cd9660_util.c 77 1.59 tsutsui 78 1.59 tsutsui .if !make(obj) && !make(clean) && !make(cleandir) 79 1.59 tsutsui .BEGIN: 80 1.59 tsutsui -rm -rf fs 81 1.59 tsutsui ${HOST_INSTALL_DIR} fs 82 1.59 tsutsui ${HOST_INSTALL_DIR} fs/cd9660 83 1.59 tsutsui ${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/unicode.h fs 84 1.59 tsutsui ${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/cd9660/iso.h fs/cd9660 85 1.59 tsutsui ${HOST_LN} -s ${NETBSDSRCDIR}/sys/fs/cd9660/cd9660_extern.h fs/cd9660 86 1.59 tsutsui .endif 87 1.59 tsutsui 88 1.59 tsutsui cleandir distclean: cleaninc 89 1.59 tsutsui 90 1.59 tsutsui cleaninc: 91 1.59 tsutsui -rm -rf fs 92 1.59 tsutsui .endif 93 1.59 tsutsui 94 1.17 lukem UFSSRC= ${NETBSDSRCDIR}/sys/ufs 95 1.59 tsutsui CD9660SRC= ${NETBSDSRCDIR}/sys/fs/cd9660 96 1.12 lukem CPPFLAGS+= -I${.CURDIR} -I. 97 1.59 tsutsui .PATH: ${.CURDIR}/arch ${UFSSRC}/ffs ${UFSSRC}/ext2fs ${CD9660SRC} 98 1.26 mrg 99 1.36 mrg .if !defined(HOSTPROGNAME) 100 1.35 mrg .for f in i386 macppc 101 1.35 mrg COPTS.${f}.c+= -Wno-pointer-sign 102 1.35 mrg .endfor 103 1.35 mrg 104 1.52 thorpej .if !empty(SRCS:Mevboards.c) 105 1.52 thorpej LDADD+= -lprop 106 1.52 thorpej DPADD+= ${LIBPROP} 107 1.52 thorpej .endif 108 1.52 thorpej 109 1.49 mlelstv LDADD+= -lutil 110 1.49 mlelstv DPADD+= ${LIBUTIL} 111 1.50 joerg .endif 112 1.49 mlelstv 113 1.58 lukem CWARNFLAGS+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 114 1.51 joerg 115 1.1 lukem .include <bsd.prog.mk> 116