Makefile revision 1.21
1#	$NetBSD: Makefile,v 1.21 2019/09/23 13:42:37 christos Exp $
2
3PROG=		zboot
4
5S=		${.CURDIR}/../../../..
6
7SRCS=		crt0.c
8SRCS+=		boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c
9SRCS+=		loadfile_zboot.c
10SRCS+=		getsecs.c termios.c unixcons.c unixdev.c unixsys.S
11SRCS+=		pathfs.c
12
13NOMAN=		# defined
14
15.include <bsd.init.mk>
16
17CFLAGS+=	-Wall -Wno-main
18CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
19CFLAGS+=	-fno-stack-protector -fno-builtin -ffreestanding
20CFLAGS+=	-fno-unwind-tables
21CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S}
22CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
23CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
24CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
25CPPFLAGS+=	-marm
26CPUFLAGS=
27AFLAGS+=	-D_LOCORE
28LDFLAGS+=	-nostdlib -Bstatic
29
30LIBCRT0=	crt0.o
31LIBCRTI=	# nothing
32LIBC=		# nothing
33LIBCRTBEGIN=	# nothing
34LIBCRTEND=	# nothing
35
36NEWVERSWHAT?=   "Boot"
37
38### find out what to use for libkern
39KERN_AS=	library
40.include "${S}/lib/libkern/Makefile.inc"
41LIBKERN=	${KERNLIB}
42
43### find out what to use for libz
44Z_AS=		library
45.include "${S}/lib/libz/Makefile.inc"
46LIBZ=		${ZLIB}
47
48### find out what to use for libsa
49SA_AS=		library
50SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes
51.include "${S}/lib/libsa/Makefile.inc"
52LIBSA=		${SALIB}
53
54${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
55	${_MKTARGET_LINK}
56	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
57
58.include "${S}/conf/newvers_stand.mk"
59
60.include <bsd.klinks.mk>
61.include <bsd.prog.mk>
62
63cleandir distclean: .WAIT cleanlibdir
64
65cleanlibdir:
66	-rm -rf lib
67
68release: check_RELEASEDIR
69	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
70	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation
71