Makefile.usermode revision 1.9
1# $NetBSD: Makefile.usermode,v 1.9 2011/08/12 11:22:11 jmcneill Exp $
2
3MACHINE_ARCH=			usermode
4USETOOLS?=			no
5NEED_OWN_INSTALL_TARGET?=	no
6.include <bsd.own.mk>
7
8##
9## (1) port identification
10##
11USERMODE=	$S/arch/usermode
12GENASSYM_CONF=	${USERMODE}/usermode/genassym.cf
13
14##
15## (2) compile settings
16##
17DEFCOPTS=	-O2 -fno-omit-frame-pointer
18CPPFLAGS+=	-Dusermode
19CPPFLAGS.init_main.c+=	-Dmain=kernmain
20
21CPPFLAGS.thunk.c+=	-U_KERNEL -I/usr/include
22
23##
24## (3) libkern and compat
25##
26KERN_AS=	obj
27COMPAT_AS=	obj
28
29##
30## (4) local objects, compile rules, and dependencies
31##
32MD_OBJS=	thunk.o
33MD_CFILES=	${USERMODE}/usermode/thunk.c
34MD_SFILES=
35
36##
37## (5) link settings
38##
39SYSTEM_LD=	@${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
40		${_MKSHECHO}\
41		${CC} ${COPTS} -Wl,-Map,$@.map -o $@ '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o; \
42		${CC} ${COPTS} -Wl,-Map,$@.map -o $@ ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
43NVFLAGS=	-n
44
45##
46## (6) port specific target dependencies
47##
48
49.if !make(obj) && !make(clean) && !make(cleandir)
50.BEGIN:
51	@rm -f i386 && \
52		ln -s $S/arch/i386/include i386
53.endif
54
55thunk.o: ${USERMODE}/usermode/thunk.c
56	${CC} ${COPTS} -I${.CURDIR} -c -o $@ ${USERMODE}/usermode/thunk.c
57
58##
59## (7) misc settings
60##
61
62##
63## (8) config(8) generated machinery
64%INCLUDES
65
66%OBJS
67
68%CFILES
69
70%SFILES
71
72%LOAD
73
74%RULES
75
76##
77## (9) port independent kernel machinery
78##
79.include "$S/conf/Makefile.kern.inc"
80
81##
82## (10) appending make options
83##
84%MAKEOPTIONSAPPEND
85