1# $OpenBSD: Makefile,v 1.2 1996/11/27 19:54:54 niklas Exp $ 2# $NetBSD: Makefile,v 1.3 1996/10/18 06:02:24 thorpej Exp $
| 1# $OpenBSD: Makefile,v 1.3 1997/05/05 06:01:59 millert Exp $ 2# $NetBSD: Makefile,v 1.11 1997/04/17 07:27:50 thorpej Exp $
|
3
| 3
|
4.PATH: ${.CURDIR}/.. ${.CURDIR}/../../../../lib/libsa
| 4S= ${.CURDIR}/../../../..
|
5
| 5
|
6BOOT_PROG = netboot 7BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
| 6.PATH: ${.CURDIR}/.. ${.CURDIR}/../boot
|
8
| 7
|
9BOOT_SRCS = start.S netboot.c prom.c prom_disp.S OSFpal.c prom_swpal.S 10BOOT_SRCS+= printf.c bzero.c rpcc.S
| 8PROG = netboot
|
11
| 9
|
12BOOT_SRCS+= dev_net.c conf.c devopen.c 13BOOT_SRCS+= nfs.c rpc.c alloc.c ntohl.c htonl.c ntohs.c htons.c net.c bootp.c 14BOOT_SRCS+= strlen.c dev.c bcmp.c strerror.c rarp.c read.c lseek.c 15BOOT_SRCS+= in_cksum.c exit.c closeall.c arp.c strncpy.c globals.c open.c 16BOOT_SRCS+= close.c ether.c netif.c
| 10SRCS = start.S boot.c prom.c prom_disp.S OSFpal.c prom_swpal.S 11SRCS+= rpcc.S 12SRCS+= dev_net.c conf.c devopen.c 13SRCS+= if_prom.c loadfile.c getsecs.c 14NOMAN= 15INSTALL_STRIP= 16BINMODE= 444
|
17
| 17
|
18BOOT_SRCS+= if_prom.c loadfile.c getsecs.c
| 18BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS} 19HEADERSIZE_PROG = headersize
|
19
| 20
|
20BOOT_OBJS = ${BOOT_SRCS:N*.h:R:S/$/.o/g}
| 21CLEANFILES+= vers.c vers.o ${PROG}.sym ${PROG}.nosym ${HEADERSIZE_PROG}
|
21
| 22
|
22HEADERSIZE_PROG = headersize
| 23DEFNS= -DPRIMARY_BOOTBLOCK -DALPHA_BOOT_ECOFF # -DALPHA_BOOT_ELF
|
23
| 24
|
24AFLAGS += -DASSEMBLER 25CPPFLAGS += -I${.CURDIR}/../../../../ \ 26 -I${.CURDIR}/../../../../lib/libsa \ 27 -I${.CURDIR}/../.. -DPRIMARY_BOOTBLOCK \ 28 -DALPHA_BOOT_ECOFF # -DALPHA_BOOT_ELF 29CFLAGS = -Werror -mno-fp-regs -g
| 25AFLAGS += -DASSEMBLER ${DEFNS} 26CPPFLAGS += -I${.CURDIR}/../.. -I${S} ${DEFNS} 27CFLAGS = -Werror -mno-fp-regs
|
30
| 28
|
31CLEANFILES+= vers.c vers.o
| 29${PROG}.nosym: ${PROG}.sym 30 cp ${PROG}.sym ${PROG}.nosym 31 strip ${PROG}.nosym
|
32
| 32
|
33.PATH: ${.CURDIR} ${.CURDIR}/../../../../lib/libkern ${.CURDIR}/../boot
| 33${PROG}: ${PROG}.nosym ${HEADERSIZE_PROG} 34 dd if=${PROG}.nosym of=${PROG} \ 35 bs=`./${HEADERSIZE_PROG} ${BOOT_RELOC} ${PROG}.nosym` skip=1
|
34
| 36
|
35all: ${BOOT_PROG}
| 37# no lint here (yet?) 38lint:
|
36
| 39
|
37${BOOT_PROG}: ${BOOT_OBJS} ${HEADERSIZE_PROG} 38 sh ${.CURDIR}/newvers.sh ${.CURDIR}/version 39 ${COMPILE.c} vers.c 40 ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${BOOT_PROG}.hdr \ 41 ${BOOT_OBJS} vers.o -lc # XXX 42 size ${BOOT_PROG}.hdr 43 strip ${BOOT_PROG}.hdr 44 dd if=${BOOT_PROG}.hdr of=${BOOT_PROG} \ 45 bs=`./${HEADERSIZE_PROG} ${BOOT_RELOC} ${BOOT_PROG}.hdr` skip=1
| 40.include <bsd.prog.mk>
|
46
| 41
|
47install: 48 ${INSTALL} -c -o bin -g bin -m 444 ${BOOT_PROG} \ 49 ${DESTDIR}${BINDIR}/${BOOT_PROG}
| 42### find out what to use for libkern 43KERN_AS= library 44KERNDST= ${.CURDIR}/../libkern/${__objdir} 45.include "${.CURDIR}/../libkern/Makefile.inc" 46LIBKERN= ${KERNLIB}
|
50
| 47
|
51clean: _SUBDIRUSE 52 rm -f a.out [Ee]rrs mklog core *.core \ 53 ${BOOT_PROG} ${BOOT_OBJS} ${CLEANFILES} \ 54 ${BOOT_PROG}.hdr ${BOOT_PROG}.nohdr ${HEADERSIZE_PROG}
| 48### find out what to use for libz 49Z_AS= library 50ZDST= ${.CURDIR}/../libz/${__objdir} 51.include "${.CURDIR}/../libz/Makefile.inc" 52LIBZ= ${ZLIB}
|
55
| 53
|
56cleandir: _SUBDIRUSE clean
| 54### find out what to use for libsa 55SA_AS= library 56SADST= ${.CURDIR}/../libsa/${__objdir} 57SAREL= 58SA_ZLIB= yes 59.include "${.CURDIR}/../libsa/Makefile.inc" 60LIBSA= ${SALIB}
|
57
| 61
|
58.include "${.CURDIR}/../Makefile.inc" 59.include <bsd.obj.mk> 60.include <bsd.dep.mk> 61.include <bsd.subdir.mk>
| 62${PROG}.sym: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 63 sh ${.CURDIR}/newvers.sh ${.CURDIR}/version 64 ${COMPILE.c} vers.c 65 ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym \ 66 ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} 67 size ${PROG}.sym
|
| |