summaryrefslogtreecommitdiff
path: root/sys/arch/zaurus/stand/zbsdmod/Makefile
blob: 82017bdbf5ffb0a8f3da6ea246d3e50f762af14a (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
#	$NetBSD: Makefile,v 1.12 2019/10/26 10:10:14 tsutsui Exp $

WARNS?=	4

.include <bsd.init.mk>

S=	${.CURDIR}/../../../..

OBJS=	zbsdmod.o
SRCS=	zbsdmod.c
NOMAN=	# defined

OBJCOPY_FLAGS=			\
	-R .debug_abbrev	\
	-R .debug_aranges	\
	-R .debug_info		\
	-R .debug_line		\
	-R .debug_loc		\
	-R .debug_ranges	\
	-R .debug_str		\
	-R .eh_frame

realall: ${OBJS}
	${OBJCOPY} ${OBJCOPY_FLAGS} ${.OBJDIR}/zbsdmod.o

.include <bsd.klinks.mk>
.include <bsd.prog.mk>

afterinstall:
	${INSTALL_FILE} ${INSTALL_COPY} -o root -g wheel -m 644 \
		${OBJS} ${DESTDIR}/${BINDIR}

CPUFLAGS=
DBG=		-Os
CFLAGS+=	-fno-strict-aliasing
CFLAGS+=	-ffreestanding -nostdinc
CFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
CPPFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
CPPFLAGS+=	-D_STANDALONE
CPPFLAGS+=	-I${.OBJDIR} -I${S}

release: check_RELEASEDIR
	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${OBJS} \
	    ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation