blob: 9cef7d5d89505866e6dfcfbbd354313a3b95620e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# $NetBSD: Makefile,v 1.5 1995/01/18 06:53:36 mellon Exp $
# @(#)Makefile 8.3 (Berkeley) 2/16/94
DESTDIR=
STAND= ../../stand
#VPATH= ${STAND}
# RELOC=80200000 allows for boot prog up to 1D0000 (1900544) bytes long
RELOC= 80200000
S= ../../..
INCLUDES= -I. -I$S/arch -I$S -I$S/lib/libsa
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dwgrisc
CDIAGFLAGS= -Werror -Wall -Wno-uninitialized -Wno-format
DEFS= -DSTANDALONE -DDEBUG
CFLAGS= ${DEBUG} -O2 ${CDIAGFLAGS} -mno-abicalls -mips1 -mcpu=r3000
AFLAGS= -O2 ${INCPATH} ${DEFS} -DLOCORE
### find out what to use for libkern
.include "$S/lib/libkern/Makefile.inc"
LIBKERN= ${KERNLIB}
.include "$S/lib/libsa/Makefile.inc"
# not yet: need to write libsa/Makefile.inc first
LIBS= ${KERNLIB} ${SALIB}
DRIVERS= rz.c
SRCS= ${DRIVERS}
#STUFF= callvec.c devopen.c getenv.c gets.c strcmp.c
STUFF=
ALL= boot
.s.o:
${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
${AS} -o ${.TARGET}
all: ${ALL}
boot: ${LIBS}
#libsa/libsa.a::
# cd libsa; make
${.OBJDIR}/libdrive.a: ${DRIVERS:.c=.o}
ar crv $@ $?
ranlib $@
# depend on DEFS
# bootable from real disks
boot: start.o boot.o filesystem.o ${LIBS}
ld -N -Ttext ${RELOC} -e __start start.o boot.o filesystem.o ${LIBS} -o boot.elf
elf2ecoff boot.elf boot
start.o: ${.CURDIR}/start.S
mkboot: ${.CURDIR}/mkboot.c
${CC} ${CFLAGS} -o mkboot ${.CURDIR}/mkboot.c
# utilities
clean::
rm -f .depend *.o *.exe *.i errs make.out core*
rm -f a.out ${ALL}
rm -f libdrive.a
cd libsa; make cleandir
install:
.include <bsd.dep.mk>
.include <bsd.obj.mk>
|