Makefile revision 1.6
1# $NetBSD: Makefile,v 1.6 2011/01/27 16:13:51 phx Exp $ 2 3S= ${.CURDIR}/../../../.. 4 5PROG= altboot 6NOMAN= # defined 7SRCS= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c nif.c 8SRCS+= fxp.c tlp.c rge.c skg.c dsk.c pciide.c siisata.c printf.c 9SRCS+= vers.c 10CLEANFILES+= vers.c ${PROG} ${PROG}.bin 11CFLAGS+= -Wall -Wno-main -ffreestanding -msoft-float -mmultiple 12CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 13CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP 14#CPPFLAGS+= -DCONSNAME=\"com\" -DCONSPORT=0x3f8 -DCONSSPEED=115200 15#CPPFLAGS+= -DCONSNAME=\"eumb\" -DCONSPORT=0x4600 -DCONSSPEED=57600 16CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I${S} 17DBG= -Os 18 19.include <bsd.own.mk> 20 21# XXX SHOULD NOT NEED TO DEFINE THESE! 22LIBCRT0= 23LIBC= 24LIBCRTBEGIN= 25LIBCRTEND= 26 27STRIPFLAG= 28BINMODE= 444 29 30RELOC= 1000000 31ENTRY= _start 32 33.if !make(obj) && !make(clean) && !make(cleandir) 34.BEGIN: 35 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 36 @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 37.NOPATH: machine powerpc 38.endif 39CLEANFILES+= machine powerpc 40 41### find out what to use for libkern 42KERN_AS= library 43.include "${S}/lib/libkern/Makefile.inc" 44LIBKERN= ${KERNLIB} 45 46### find out what to use for libz 47Z_AS= library 48.include "${S}/lib/libz/Makefile.inc" 49LIBZ= ${ZLIB} 50 51### find out what to use for libsa 52SA_AS= library 53SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 54.include "${S}/lib/libsa/Makefile.inc" 55LIBSA= ${SALIB} 56 57.PHONY: vers.c 58vers.c: version 59 ${HOST_SH} ${S}/conf/newvers_stand.sh -K \ 60 ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "sandpoint" 61 62${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 63 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \ 64 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 65 ${OBJCOPY} -S -O binary ${.TARGET} ${.TARGET}.bin 66 67.include <bsd.prog.mk> 68