blob: cd08e9c6c6819e1a252a3de7781866e09b1bfd64 (
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
|
# $NetBSD: Makefile,v 1.8 2018/07/25 23:45:32 kamil Exp $
PROG= prekern
SRCS= locore.S trap.S prekern.c mm.c console.c elf.c prng.c
NOSSP= # defined
NOPIE= # defined
NOLIBCSANITIZER=# defined
NOSANITIZER= # defined
NOMAN= 1
S= ${.CURDIR}/../../../..
.PATH: ${.CURDIR}
BINDIR= /usr/mdec
BINMODE= 444
.include <bsd.init.mk>
CPPFLAGS+= -I. -I${S} -I${.OBJDIR} -I${.CURDIR}
CPPFLAGS+= -D_STANDALONE
.include <bsd.klinks.mk>
CPPFLAGS+= -DKERNEL -D__x86_64__
CFLAGS+= -Wall -Werror -Wstrict-prototypes
CFLAGS+= -mno-red-zone -mno-mmx -mno-sse -mno-avx -ffreestanding
STRIPFLAG=
LINKFLAGS= -X -z max-page-size=0x100000 -Ttext 0x100000 \
-T ${S}/arch/amd64/stand/prekern/prekern.ldscript
KERN_AS= library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN= ${KERNLIB}
LIBCRT0= # nothing
LIBCRTI= # nothing
LIBC= # nothing
LIBCRTBEGIN= # nothing
LIBCRTEND= # nothing
${PROG}: ${OBJS} ${LIBKERN}
${_MKTARGET_LINK}
${LD} ${LINKFLAGS} -o ${.TARGET} ${OBJS} ${LIBKERN}
all: ${PROG}
.include <bsd.prog.mk>
cleandir distclean: .WAIT cleanlibdir
cleanlibdir:
-rm -rf lib
|