Makefile revision 1.1
1# $NetBSD: Makefile,v 1.1 2009/03/02 09:33:02 nonaka 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 11 12NOMAN= # defined 13 14CFLAGS+= -Wall -Wno-main 15CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 16CFLAGS+= -fno-stack-protector -fno-builtin -ffreestanding 17CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} 18CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE 19AFLAGS+= -D_LOCORE 20LDFLAGS+= -nostdlib -Bstatic 21 22CLEANFILES+= vers.c vers.o 23 24LIBCRT0= crt0.o 25LIBC= # nothing 26LIBCRTBEGIN= # nothing 27LIBCRTEND= # nothing 28 29NEWVERSWHAT?= "Boot" 30VERSIONFILE?= ${.CURDIR}/version 31 32.if !make(obj) && !make(clean) && !make(cleandir) && !make(release) 33.BEGIN: machine arm 34.NOPATH: machine arm 35 36machine:: 37 -rm -f $@ 38 ln -s ${S}/arch/${MACHINE}/include $@ 39 40arm:: 41 -rm -f $@ 42 ln -s ${S}/arch/arm/include $@ 43.endif 44CLEANFILES+= machine arm 45 46### find out what to use for libkern 47KERN_AS= library 48.include "${S}/lib/libkern/Makefile.inc" 49LIBKERN= ${KERNLIB} 50 51### find out what to use for libz 52Z_AS= library 53.include "${S}/lib/libz/Makefile.inc" 54LIBZ= ${ZLIB} 55 56### find out what to use for libsa 57SA_AS= library 58SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 59.include "${S}/lib/libsa/Makefile.inc" 60LIBSA= ${SALIB} 61 62${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 63 ${HOST_SH} ${S}/conf/newvers_stand.sh ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT} 64 ${CC} -c vers.c 65 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 66 67.include <bsd.prog.mk> 68 69cleandir distclean: cleanlibdir 70 71cleanlibdir: 72 -rm -rf lib 73 74release: check_RELEASEDIR 75 ${HOST_INSTALL_FILE} -m ${BINMODE} ${OBJS} \ 76 ${RELEASEDIR}/${MACHINE}/installation 77