Makefile revision 1.5
1# $NetBSD: Makefile,v 1.5 2017/11/26 11:01:09 maxv 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 -T prekern.ldscript 29 30KERN_AS= library 31.include "${S}/lib/libkern/Makefile.inc" 32LIBKERN= ${KERNLIB} 33 34LIBCRT0= # nothing 35LIBCRTI= # nothing 36LIBC= # nothing 37LIBCRTBEGIN= # nothing 38LIBCRTEND= # nothing 39 40${PROG}: ${OBJS} ${LIBKERN} 41 ${_MKTARGET_LINK} 42 ${LD} ${LINKFLAGS} -o ${.TARGET} ${OBJS} ${LIBKERN} 43 44all: ${PROG} 45 46.include <bsd.prog.mk> 47 48cleandir distclean: .WAIT cleanlibdir 49 50cleanlibdir: 51 -rm -rf lib 52