Makefile revision 1.6
1# $NetBSD: Makefile,v 1.6 2017/12/23 06:48:30 ryoon Exp $ 2 3PROG= prekern 4SRCS= locore.S trap.S prekern.c mm.c console.c elf.c prng.c 5 6NOSSP= # defined 7NOPIE= # defined 8NOMAN= 1 9 10S= ${.CURDIR}/../../../.. 11 12.PATH: ${.CURDIR} 13 14BINDIR= /usr/mdec 15BINMODE= 444 16 17.include <bsd.own.mk> 18 19CPPFLAGS+= -I. -I${S} -I${.OBJDIR} -I${.CURDIR} 20CPPFLAGS+= -D_STANDALONE 21 22.include <bsd.klinks.mk> 23 24CPPFLAGS+= -DKERNEL -D__x86_64__ 25CFLAGS+= -Wall -Werror -Wstrict-prototypes 26CFLAGS+= -mno-red-zone -mno-mmx -mno-sse -mno-avx -ffreestanding 27STRIPFLAG= 28LINKFLAGS= -X -z max-page-size=0x100000 -Ttext 0x100000 \ 29 -T ${S}/arch/amd64/stand/prekern/prekern.ldscript 30 31KERN_AS= library 32.include "${S}/lib/libkern/Makefile.inc" 33LIBKERN= ${KERNLIB} 34 35LIBCRT0= # nothing 36LIBCRTI= # nothing 37LIBC= # nothing 38LIBCRTBEGIN= # nothing 39LIBCRTEND= # nothing 40 41${PROG}: ${OBJS} ${LIBKERN} 42 ${_MKTARGET_LINK} 43 ${LD} ${LINKFLAGS} -o ${.TARGET} ${OBJS} ${LIBKERN} 44 45all: ${PROG} 46 47.include <bsd.prog.mk> 48 49cleandir distclean: .WAIT cleanlibdir 50 51cleanlibdir: 52 -rm -rf lib 53