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