1 # $NetBSD: Makefile,v 1.1 1996/09/18 20:03:04 cgd Exp $ 2 3 .PATH: ${.CURDIR}/.. ${.CURDIR}/../../../../lib/libsa 4 5 BOOT_PROG = netboot 6 BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS} 7 8 BOOT_SRCS = start.S netboot.c prom.c prom_disp.S OSFpal.c prom_swpal.S 9 BOOT_SRCS+= printf.c bzero.c rpcc.S 10 11 BOOT_SRCS+= dev_net.c conf.c devopen.c 12 BOOT_SRCS+= nfs.c rpc.c alloc.c ntohl.c htonl.c ntohs.c htons.c net.c bootp.c 13 BOOT_SRCS+= strlen.c bcopy.c dev.c bcmp.c strerror.c rarp.c read.c lseek.c 14 BOOT_SRCS+= in_cksum.c exit.c closeall.c arp.c strncpy.c globals.c open.c 15 BOOT_SRCS+= close.c ether.c netif.c 16 17 BOOT_SRCS+= if_prom.c loadfile.c getsecs.c 18 19 BOOT_OBJS = ${BOOT_SRCS:N*.h:R:S/$/.o/g} 20 21 HEADERSIZE_PROG = headersize 22 23 AFLAGS += -DASSEMBLER 24 CPPFLAGS += -I${.CURDIR}/../../../../ \ 25 -I${.CURDIR}/../../../../lib/libsa \ 26 -I${.CURDIR}/../.. -DPRIMARY_BOOTBLOCK -DETHER_DEBUG \ 27 -DALPHA_BOOT_ECOFF -DALPHA_BOOT_ELF 28 CFLAGS = -Werror -mno-fp-regs -g 29 30 CLEANFILES+= vers.c vers.o 31 32 .PATH: ${.CURDIR} ${.CURDIR}/../../../../lib/libkern ${.CURDIR}/../boot 33 34 all: ${BOOT_PROG} 35 36 ${BOOT_PROG}: ${BOOT_OBJS} ${HEADERSIZE_PROG} 37 sh ${.CURDIR}/newvers.sh ${.CURDIR}/version 38 ${COMPILE.c} vers.c 39 ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${BOOT_PROG}.coff \ 40 ${BOOT_OBJS} vers.o -lc # XXX 41 size ${BOOT_PROG}.coff 42 strip ${BOOT_PROG}.coff 43 dd if=${BOOT_PROG}.coff of=${BOOT_PROG} \ 44 bs=`./${HEADERSIZE_PROG} < ${BOOT_PROG}.coff` skip=1 45 46 install: 47 install -c -o bin -g bin -m 444 ${BOOT_PROG} \ 48 ${DESTDIR}${BINDIR}/${BOOT_PROG} 49 50 clean: _SUBDIRUSE 51 rm -f a.out [Ee]rrs mklog core *.core \ 52 ${BOOT_PROG} ${BOOT_OBJS} ${CLEANFILES} \ 53 ${BOOT_PROG}.coff ${BOOT_PROG}.nohdr ${HEADERSIZE_PROG} 54 55 cleandir: _SUBDIRUSE clean 56 57 .include "${.CURDIR}/../Makefile.inc" 58 .include <bsd.obj.mk> 59 .include <bsd.dep.mk> 60 .include <bsd.subdir.mk> 61