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