1 1.1 tsubai # $NetBSD: Makefile,v 1.1 1998/05/15 10:15:59 tsubai Exp $ 2 1.1 tsubai 3 1.1 tsubai S= ${.CURDIR}/../../../.. 4 1.1 tsubai 5 1.1 tsubai PROG= ofwboot 6 1.1 tsubai SRCS= Locore.c boot.c ofdev.c net.c netif_of.c alloc.c 7 1.1 tsubai .PATH: ${S}/arch/powerpc/powerpc 8 1.1 tsubai SRCS+= ofwmagic.S 9 1.1 tsubai #CFLAGS+= -DDEBUG -DNETIF_DEBUG 10 1.1 tsubai NOMAN= 11 1.1 tsubai STRIPFLAG= 12 1.1 tsubai BINMODE= 444 13 1.1 tsubai OBJCOPY?= objcopy 14 1.1 tsubai 15 1.1 tsubai NEWVERSWHAT= "OpenFirmware Boot" 16 1.1 tsubai 17 1.1 tsubai # For now... 18 1.1 tsubai #RELOC= 20000 19 1.1 tsubai RELOC= 3e0000 20 1.1 tsubai 21 1.1 tsubai ENTRY= _start 22 1.1 tsubai 23 1.1 tsubai CLEANFILES+= vers.c vers.o ${PROG}.elf 24 1.1 tsubai 25 1.1 tsubai CPPFLAGS+= -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. 26 1.1 tsubai CPPFLAGS+= -DRELOC=0x${RELOC} 27 1.1 tsubai CPPFLAGS+= -DFIRMWORKSBUGS 28 1.1 tsubai CPPFLAGS+= -DPOWERPC_BOOT_AOUT 29 1.1 tsubai CPPFLAGS+= -DPOWERPC_BOOT_ELF 30 1.1 tsubai #CPPFLAGS+= -DXCOFF_GLUE # for booting PCI Powermacs 31 1.1 tsubai 32 1.1 tsubai ### find out what to use for libkern 33 1.1 tsubai KERN_AS= library 34 1.1 tsubai .include "${S}/lib/libkern/Makefile.inc" 35 1.1 tsubai LIBKERN= ${KERNLIB} 36 1.1 tsubai 37 1.1 tsubai ### find out what to use for libz 38 1.1 tsubai Z_AS= library 39 1.1 tsubai .include "${S}/lib/libz/Makefile.inc" 40 1.1 tsubai LIBZ= ${ZLIB} 41 1.1 tsubai 42 1.1 tsubai ### find out what to use for libsa 43 1.1 tsubai SA_AS= library 44 1.1 tsubai SAMISCMAKEFLAGS= SA_USE_CREAD=yes 45 1.1 tsubai .include "${S}/lib/libsa/Makefile.inc" 46 1.1 tsubai LIBSA= ${SALIB} 47 1.1 tsubai 48 1.1 tsubai ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 49 1.1 tsubai sh ${.CURDIR}/../newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 50 1.1 tsubai ${COMPILE.c} vers.c 51 1.1 tsubai ${LD} -N -Ttext ${RELOC} -Bstatic -o ${PROG} \ 52 1.1 tsubai ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 53 1.1 tsubai mv ${PROG} ${PROG}.elf 54 1.1 tsubai ../elfextract/elfextract ${PROG}.elf ${PROG} 55 1.1 tsubai # ${OBJCOPY} --input-target=elf32-powerpc \ 56 1.1 tsubai # --output-target=xcoff-powermac ${PROG}.elf ${PROG}.xcf 57 1.1 tsubai 58 1.1 tsubai .include <bsd.prog.mk> 59