xref: /openbsd/sys/arch/alpha/stand/boot/Makefile (revision df930be7)
1#	$NetBSD: Makefile,v 1.4 1995/06/28 00:58:44 cgd Exp $
2#
3# BSD Boot blocks for the Alpha
4#
5# XXX should generate a primary boot block, too...
6
7INCPATH=-I../../../.. -I.
8
9# Boot relocation address
10RELOC1=	20020000
11# Low memory test program relocation address
12#RELOC2=	20004000
13# High memory test program relocation address
14RELOC2=	fffffc0000230000
15
16# Compiler and assembler flags used to generate boot blocks.
17#
18DEFS=	-DSTANDALONE
19AFLAGS+=-DASSEMBLER ${INCPATH}
20CFLAGS= -mno-fp-regs ${INCPATH} ${DEFS}
21
22LIBS=	libsa/libsa.a -lc
23SRCS=	boot.c disk.c conf.c prom.c test.c
24
25all: boot
26
27libsa/libsa.a::
28	cd libsa; make
29
30# This boot is supposed to be installed in this way:
31#	cp boot <true_root_of_disk>/boot
32BOBJS=	boot.o conf.o disk.o prom.o prom_disp.o prom_swpal.o vers.o
33boot: start.o ${BOBJS} ${LIBS}
34	${LD} -Ttext ${RELOC1} -N \
35	    -e start -o ${.TARGET} start.o ${BOBJS} ${LIBS}
36
37# This boot is supposed to be installed in this way:
38#	cp test_boot <true_root_of_disk>/test_boot
39#
40# It is used presumably in this way:
41#	boot -fi "test_boot" dka300
42TOBJS=	prom.o prom_disp.o prom_swpal.o test.o
43test_boot: start.o ${TOBJS} ${LIBS}
44	${LD} -T ${RELOC2} -N -e start -o ${.TARGET} start.o ${TOBJS} ${LIBS}
45
46clean cleandir:
47	rm -f .depend *.o *.exe *.i errs make.out core* vers.c
48	rm -f a.out boot test_boot
49	cd libsa && make cleandir
50
51install:
52	install -c -o root -g wheel -m 555 boot ${DESTDIR}/
53
54depend: ${SRCS}
55	mkdep -p ${INCPATH} ${DEFS} ${SRCS}
56	cd libsa && make depend
57
58newvers:
59	sh newvers.sh
60
61vers.c: newvers
62