1 # $NetBSD: Makefile,v 1.21 2019/09/23 13:42:37 christos Exp $ 2 3 PROG= zboot 4 5 S= ${.CURDIR}/../../../.. 6 7 SRCS= crt0.c 8 SRCS+= boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c 9 SRCS+= loadfile_zboot.c 10 SRCS+= getsecs.c termios.c unixcons.c unixdev.c unixsys.S 11 SRCS+= pathfs.c 12 13 NOMAN= # defined 14 15 .include <bsd.init.mk> 16 17 CFLAGS+= -Wall -Wno-main 18 CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 19 CFLAGS+= -fno-stack-protector -fno-builtin -ffreestanding 20 CFLAGS+= -fno-unwind-tables 21 CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} 22 CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE 23 CPPFLAGS+= -DLIBSA_ENABLE_LS_OP 24 CPPFLAGS+= ${ARM_APCS_FLAGS} -mcpu=xscale 25 CPPFLAGS+= -marm 26 CPUFLAGS= 27 AFLAGS+= -D_LOCORE 28 LDFLAGS+= -nostdlib -Bstatic 29 30 LIBCRT0= crt0.o 31 LIBCRTI= # nothing 32 LIBC= # nothing 33 LIBCRTBEGIN= # nothing 34 LIBCRTEND= # nothing 35 36 NEWVERSWHAT?= "Boot" 37 38 ### find out what to use for libkern 39 KERN_AS= library 40 .include "${S}/lib/libkern/Makefile.inc" 41 LIBKERN= ${KERNLIB} 42 43 ### find out what to use for libz 44 Z_AS= library 45 .include "${S}/lib/libz/Makefile.inc" 46 LIBZ= ${ZLIB} 47 48 ### find out what to use for libsa 49 SA_AS= library 50 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes 51 .include "${S}/lib/libsa/Makefile.inc" 52 LIBSA= ${SALIB} 53 54 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 55 ${_MKTARGET_LINK} 56 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 57 58 .include "${S}/conf/newvers_stand.mk" 59 60 .include <bsd.klinks.mk> 61 .include <bsd.prog.mk> 62 63 cleandir distclean: .WAIT cleanlibdir 64 65 cleanlibdir: 66 -rm -rf lib 67 68 release: check_RELEASEDIR 69 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 70 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation 71