1 # $NetBSD: Makefile,v 1.8.6.1 2013/06/23 06:20:15 tls 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.own.mk> 16 17 CFLAGS+= -Wall -Wno-main 18 CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 19 CFLAGS+= -fno-stack-protector -fno-builtin -ffreestanding 20 CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} 21 CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE 22 CPPFLAGS+= -DLIBSA_ENABLE_LS_OP 23 CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -mcpu=xscale 24 CPUFLAGS= 25 AFLAGS+= -D_LOCORE 26 LDFLAGS+= -nostdlib -Bstatic 27 28 CLEANFILES+= vers.c vers.o 29 30 LIBCRT0= crt0.o 31 LIBC= # nothing 32 LIBCRTBEGIN= # nothing 33 LIBCRTEND= # nothing 34 35 NEWVERSWHAT?= "Boot" 36 VERSIONFILE?= ${.CURDIR}/version 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} ${VERSIONFILE} 55 ${_MKTARGET_LINK} 56 ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 57 ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT} 58 ${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c 59 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 60 61 .include <bsd.klinks.mk> 62 .include <bsd.prog.mk> 63 64 cleandir distclean: .WAIT cleanlibdir 65 66 cleanlibdir: 67 -rm -rf lib 68 69 release: check_RELEASEDIR 70 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 71 ${RELEASEDIR}/${MACHINE}/installation 72