summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/stand/boot/Makefile
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 03:54:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 03:54:39 +0000
commitf12226068d16673eea9adafe99388f1061d3309f (patch)
tree90cb542d279e793d072ffc6e9f1f1add1f07179e /sys/arch/alpha/stand/boot/Makefile
parent470d0389b66fade522060561cc0c6ba36e01e7cb (diff)
update to netbsd
Diffstat (limited to 'sys/arch/alpha/stand/boot/Makefile')
-rw-r--r--sys/arch/alpha/stand/boot/Makefile102
1 files changed, 46 insertions, 56 deletions
diff --git a/sys/arch/alpha/stand/boot/Makefile b/sys/arch/alpha/stand/boot/Makefile
index 03d7c126bfa..23c3c283e7c 100644
--- a/sys/arch/alpha/stand/boot/Makefile
+++ b/sys/arch/alpha/stand/boot/Makefile
@@ -1,61 +1,51 @@
-# $NetBSD: Makefile,v 1.4 1995/06/28 00:58:44 cgd Exp $
-#
-# BSD Boot blocks for the Alpha
-#
-# XXX should generate a primary boot block, too...
-
-INCPATH=-I../../../.. -I.
-
-# Boot relocation address
-RELOC1= 20020000
-# Low memory test program relocation address
-#RELOC2= 20004000
-# High memory test program relocation address
-RELOC2= fffffc0000230000
-
-# Compiler and assembler flags used to generate boot blocks.
-#
-DEFS= -DSTANDALONE
-AFLAGS+=-DASSEMBLER ${INCPATH}
-CFLAGS= -mno-fp-regs ${INCPATH} ${DEFS}
-
-LIBS= libsa/libsa.a -lc
-SRCS= boot.c disk.c conf.c prom.c test.c
-
-all: boot
-
-libsa/libsa.a::
- cd libsa; make
-
-# This boot is supposed to be installed in this way:
-# cp boot <true_root_of_disk>/boot
-BOBJS= boot.o conf.o disk.o prom.o prom_disp.o prom_swpal.o vers.o
-boot: start.o ${BOBJS} ${LIBS}
- ${LD} -Ttext ${RELOC1} -N \
- -e start -o ${.TARGET} start.o ${BOBJS} ${LIBS}
-
-# This boot is supposed to be installed in this way:
-# cp test_boot <true_root_of_disk>/test_boot
-#
-# It is used presumably in this way:
-# boot -fi "test_boot" dka300
-TOBJS= prom.o prom_disp.o prom_swpal.o test.o
-test_boot: start.o ${TOBJS} ${LIBS}
- ${LD} -T ${RELOC2} -N -e start -o ${.TARGET} start.o ${TOBJS} ${LIBS}
-
-clean cleandir:
- rm -f .depend *.o *.exe *.i errs make.out core* vers.c
- rm -f a.out boot test_boot
- cd libsa && make cleandir
+# $NetBSD: Makefile,v 1.5 1995/11/23 02:39:20 cgd Exp $
+
+.PATH: ${.CURDIR}/.. ${.CURDIR}/../../../../lib/libsa
+
+BOOT_PROG = boot
+BOOT_RELOC = ${SECONDARY_LOAD_ADDRESS}
+
+BOOT_SRCS = start.S boot.c disk.c conf.c prom.c prom_disp.S OSFpal.c
+BOOT_SRCS+= alloc.c bzero.c close.c dev.c devopen.c disklabel.c
+BOOT_SRCS+= getfile.c gets.c ioctl.c lseek.c open.c printf.c read.c
+BOOT_SRCS+= strcmp.c ufs.c write.c bcopy.c filesystem.c strlen.c
+BOOT_SRCS+= ntohl.c prom_swpal.S
+BOOT_OBJS = ${BOOT_SRCS:N*.h:R:S/$/.o/g}
+
+HEADERSIZE_PROG = headersize
+
+AFLAGS += -DASSEMBLER
+CPPFLAGS += -I${.CURDIR}/../.. -I${.CURDIR}/../../../..
+CFLAGS = -Werror -mno-fp-regs -g -DCOMPAT_UFS
+
+CLEANFILES+= vers.c vers.o
+
+.PATH: ${.CURDIR}/../../../../lib/libkern
+
+all: ${BOOT_PROG}
+
+${BOOT_PROG}: ${BOOT_OBJS} ${HEADERSIZE_PROG}
+ sh ${.CURDIR}/newvers.sh ${.CURDIR}/version
+ ${COMPILE.c} vers.c
+ ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${BOOT_PROG}.coff \
+ ${BOOT_OBJS} vers.o -lc # XXX
+ size ${BOOT_PROG}.coff
+ strip ${BOOT_PROG}.coff
+ dd if=${BOOT_PROG}.coff of=${BOOT_PROG} \
+ bs=`./${HEADERSIZE_PROG} < ${BOOT_PROG}.coff` skip=1
install:
- install -c -o root -g wheel -m 555 boot ${DESTDIR}/
+ install -c -o bin -g bin -m 444 ${BOOT_PROG} \
+ ${DESTDIR}${BINDIR}/${BOOT_PROG}
-depend: ${SRCS}
- mkdep -p ${INCPATH} ${DEFS} ${SRCS}
- cd libsa && make depend
+clean: _SUBDIRUSE
+ rm -f a.out [Ee]rrs mklog core *.core \
+ ${BOOT_PROG} ${BOOT_OBJS} ${CLEANFILES} \
+ ${BOOT_PROG}.coff ${HEADERSIZE_PROG}
-newvers:
- sh newvers.sh
+cleandir: _SUBDIRUSE clean
-vers.c: newvers
+.include "${.CURDIR}/../Makefile.inc"
+.include <bsd.obj.mk>
+.include <bsd.dep.mk>
+.include <bsd.subdir.mk>