1 1.9.8.5 nathanw # $NetBSD: Makefile,v 1.9.8.5 2002/09/17 21:16:46 nathanw Exp $ 2 1.9.8.2 nathanw 3 1.9.8.2 nathanw S= ${.CURDIR}/../../../.. 4 1.9.8.2 nathanw 5 1.9.8.2 nathanw ### find out what to use for libkern 6 1.9.8.2 nathanw KERN_AS= library 7 1.9.8.2 nathanw .include "${S}/lib/libkern/Makefile.inc" 8 1.9.8.2 nathanw #LIBKERN= ${KERNLIB} 9 1.9.8.2 nathanw 10 1.9.8.2 nathanw ### find out what to use for libz 11 1.9.8.2 nathanw Z_AS= library 12 1.9.8.2 nathanw .include "${S}/lib/libz/Makefile.inc" 13 1.9.8.2 nathanw #LIBZ= ${ZLIB} 14 1.9.8.2 nathanw 15 1.9.8.2 nathanw ### find out what to use for libsa 16 1.9.8.2 nathanw SA_AS= library 17 1.9.8.2 nathanw SAMISCMAKEFLAGS= SA_USE_LOADFILE=yes # SA_USE_CREAD=yes 18 1.9.8.2 nathanw .include "${S}/lib/libsa/Makefile.inc" 19 1.9.8.2 nathanw #LIBSA= ${SALIB} 20 1.9.8.2 nathanw 21 1.9.8.2 nathanw RELOC= 4380000 22 1.9.8.2 nathanw 23 1.9.8.2 nathanw # XXX make defs arch-indep. 24 1.9.8.3 nathanw INCLUDES+= -I${.OBJDIR} -I${S}/arch -I${S} -I${S}/lib/libsa 25 1.9.8.2 nathanw DEFS+= -D_STANDALONE -DMC68040 -DSUPPORT_BOOTP -DSUPPORT_DHCP -DDEBUG -DSD_DEBUG -DSCSI_DEBUG # -DEN_DEBUG -DNETIF_DEBUG 26 1.9.8.2 nathanw SAMISCCPPFLAGS= -DSUPPORT_DHCP -DSUPPORT_BOOTP -DINSECURE # -DBOOTP_DEBUG -DETHER_DEBUG -DNET_DEBUG # -DNETIF_DEBUG -DNFS_DEBUG -DARP_DEBUG 27 1.9.8.2 nathanw WARNS=1 28 1.9.8.3 nathanw CFLAGS+= -ffreestanding -nostdinc ${INCLUDES} ${DEFS} 29 1.9.8.2 nathanw LIBCRT0= 30 1.9.8.2 nathanw 31 1.9.8.2 nathanw PROG= boot 32 1.9.8.2 nathanw SRCS= boot.c machdep.c conf.c devopen.c rtc.c sd.c scsi.c en.c vers.c build.c 33 1.9.8.3 nathanw 34 1.9.8.2 nathanw # @@@ dev_net.c should really be in libsa, but it doesn't 35 1.9.8.2 nathanw # declare ip_convertaddr correctly, so I put it here _temporarily_. 36 1.9.8.3 nathanw .PATH: ${S}/lib/libsa 37 1.9.8.3 nathanw SRCS+= dev_net.c 38 1.9.8.2 nathanw 39 1.9.8.2 nathanw CLEANFILES+= srt0.o boot.elf boot.raw machine ${MACHINE_ARCH} limits.h 40 1.9.8.2 nathanw CLEANFILES+= vers.c build.c build # generated dynamically 41 1.9.8.2 nathanw 42 1.9.8.2 nathanw NOMAN= # defined 43 1.9.8.2 nathanw BINDIR= /usr/mdec 44 1.9.8.2 nathanw #LIBS= ${SALIB} ${KERNLIB} ${ZLIB} 45 1.9.8.2 nathanw LIBS= ${SALIB} ${KERNLIB} 46 1.9.8.2 nathanw 47 1.9.8.3 nathanw # do not strip ${PROG} on install 48 1.9.8.3 nathanw STRIPFLAG= # defined 49 1.9.8.2 nathanw 50 1.9.8.2 nathanw AWKPROG='\ 51 1.9.8.5 nathanw function x(v) { printf "\\0\\%o\\%o\\%o", (v / 65536) % 256, (v / 256) % 256, v % 256 } \ 52 1.9.8.2 nathanw { \ 53 1.9.8.5 nathanw printf "\047\\0\\207\\01\\07"; \ 54 1.9.8.2 nathanw x($$1); \ 55 1.9.8.2 nathanw x($$2); \ 56 1.9.8.2 nathanw x($$3); \ 57 1.9.8.4 nathanw printf "\\0\\0\\0\\0\\04\\070\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\047" \ 58 1.9.8.2 nathanw }' 59 1.9.8.2 nathanw 60 1.9.8.3 nathanw ${PROG}: srt0.o ${OBJS} ${LIBS} 61 1.9.8.2 nathanw ${LD} -N -Ttext ${RELOC} -e start srt0.o ${OBJS} ${LIBS} -o $@.elf 62 1.9.8.5 nathanw ${SIZE} $@.elf 63 1.9.8.5 nathanw ${OBJCOPY} -O binary $@.elf $@.raw 64 1.9.8.5 nathanw (${SIZE} $@.elf | tail +2 | awk ${AWKPROG} | xargs printf ; cat $@.raw) > $@ 65 1.9.8.2 nathanw 66 1.9.8.2 nathanw # startup 67 1.9.8.2 nathanw 68 1.9.8.2 nathanw srt0.o: ${.CURDIR}/srt0.s 69 1.9.8.2 nathanw ${CC} -m68040 -x assembler-with-cpp ${INCLUDES} ${DEFS} -c ${.CURDIR}/srt0.s 70 1.9.8.2 nathanw 71 1.9.8.2 nathanw .PHONY: build.c 72 1.9.8.2 nathanw build.c: 73 1.9.8.2 nathanw sh ${.CURDIR}/newvers.sh 74 1.9.8.2 nathanw 75 1.9.8.2 nathanw vers.c: version 76 1.9.8.2 nathanw sh ${S}/conf/newvers_stand.sh -MD ${.CURDIR}/version "next68k" 77 1.9.8.2 nathanw 78 1.9.8.2 nathanw #installboot: ${.CURDIR}/installboot.sh 79 1.9.8.2 nathanw # @rm -f installboot 80 1.9.8.2 nathanw # cp -p ${.CURDIR}/installboot.sh installboot 81 1.9.8.2 nathanw 82 1.9.8.2 nathanw # utilities 83 1.9.8.2 nathanw 84 1.9.8.3 nathanw .if !make(obj) && !make(clean) && !make(cleandir) 85 1.9.8.3 nathanw .BEGIN: 86 1.9.8.2 nathanw rm -f machine 87 1.9.8.2 nathanw ln -s ${S}/arch/${MACHINE}/include machine 88 1.9.8.2 nathanw rm -f ${MACHINE_ARCH} 89 1.9.8.2 nathanw ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH} 90 1.9.8.3 nathanw .endif 91 1.9.8.2 nathanw 92 1.9.8.2 nathanw .include <bsd.prog.mk> 93