1 # $NetBSD: Makefile,v 1.6 2011/01/27 16:13:51 phx Exp $ 2 3 S= ${.CURDIR}/../../../.. 4 5 PROG= altboot 6 NOMAN= # defined 7 SRCS= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c nif.c 8 SRCS+= fxp.c tlp.c rge.c skg.c dsk.c pciide.c siisata.c printf.c 9 SRCS+= vers.c 10 CLEANFILES+= vers.c ${PROG} ${PROG}.bin 11 CFLAGS+= -Wall -Wno-main -ffreestanding -msoft-float -mmultiple 12 CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 13 CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP 14 #CPPFLAGS+= -DCONSNAME=\"com\" -DCONSPORT=0x3f8 -DCONSSPEED=115200 15 #CPPFLAGS+= -DCONSNAME=\"eumb\" -DCONSPORT=0x4600 -DCONSSPEED=57600 16 CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I${S} 17 DBG= -Os 18 19 .include <bsd.own.mk> 20 21 # XXX SHOULD NOT NEED TO DEFINE THESE! 22 LIBCRT0= 23 LIBC= 24 LIBCRTBEGIN= 25 LIBCRTEND= 26 27 STRIPFLAG= 28 BINMODE= 444 29 30 RELOC= 1000000 31 ENTRY= _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 39 CLEANFILES+= machine powerpc 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 54 .include "${S}/lib/libsa/Makefile.inc" 55 LIBSA= ${SALIB} 56 57 .PHONY: vers.c 58 vers.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