1 # $NetBSD: Makefile,v 1.22 2019/10/24 18:46:21 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 CPUFLAGS= 26 AFLAGS+= -D_LOCORE 27 LDFLAGS+= -nostdlib -Bstatic 28 29 LIBCRT0= crt0.o 30 LIBCRTI= # nothing 31 LIBC= # nothing 32 LIBCRTBEGIN= # nothing 33 LIBCRTEND= # nothing 34 35 NEWVERSWHAT?= "Boot" 36 37 ### find out what to use for libkern 38 KERN_AS= library 39 .include "${S}/lib/libkern/Makefile.inc" 40 LIBKERN= ${KERNLIB} 41 42 ### find out what to use for libz 43 Z_AS= library 44 .include "${S}/lib/libz/Makefile.inc" 45 LIBZ= ${ZLIB} 46 47 ### find out what to use for libsa 48 SA_AS= library 49 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes 50 .include "${S}/lib/libsa/Makefile.inc" 51 LIBSA= ${SALIB} 52 53 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 54 ${_MKTARGET_LINK} 55 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 56 57 .include "${S}/conf/newvers_stand.mk" 58 59 .include <bsd.klinks.mk> 60 .include <bsd.prog.mk> 61 62 cleandir distclean: .WAIT cleanlibdir 63 64 cleanlibdir: 65 -rm -rf lib 66 67 release: check_RELEASEDIR 68 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 69 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation 70