1 # $NetBSD: Makefile,v 1.19 2017/02/22 12:51:38 maya 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 CLEANFILES+= vers.c vers.o 31 32 LIBCRT0= crt0.o 33 LIBCRTI= # nothing 34 LIBC= # nothing 35 LIBCRTBEGIN= # nothing 36 LIBCRTEND= # nothing 37 38 NEWVERSWHAT?= "Boot" 39 VERSIONFILE?= ${.CURDIR}/version 40 41 ### find out what to use for libkern 42 KERN_AS= library 43 .include "${S}/lib/libkern/Makefile.inc" 44 LIBKERN= ${KERNLIB} 45 46 ### find out what to use for libz 47 Z_AS= library 48 .include "${S}/lib/libz/Makefile.inc" 49 LIBZ= ${ZLIB} 50 51 ### find out what to use for libsa 52 SA_AS= library 53 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes 54 .include "${S}/lib/libsa/Makefile.inc" 55 LIBSA= ${SALIB} 56 57 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${VERSIONFILE} 58 ${_MKTARGET_LINK} 59 ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 60 ${VERSIONFILE} zaurus ${NEWVERSWHAT} 61 ${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c 62 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 63 64 .include <bsd.klinks.mk> 65 .include <bsd.prog.mk> 66 67 cleandir distclean: .WAIT cleanlibdir 68 69 cleanlibdir: 70 -rm -rf lib 71 72 release: check_RELEASEDIR 73 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 74 ${RELEASEDIR}/${MACHINE}/installation 75