Makefile.usermode revision 1.9
11.9Sjmcneill# $NetBSD: Makefile.usermode,v 1.9 2011/08/12 11:22:11 jmcneill Exp $
21.1Sjmcneill
31.1SjmcneillMACHINE_ARCH=			usermode
41.1SjmcneillUSETOOLS?=			no
51.1SjmcneillNEED_OWN_INSTALL_TARGET?=	no
61.1Sjmcneill.include <bsd.own.mk>
71.1Sjmcneill
81.1Sjmcneill##
91.1Sjmcneill## (1) port identification
101.1Sjmcneill##
111.1SjmcneillUSERMODE=	$S/arch/usermode
121.1SjmcneillGENASSYM_CONF=	${USERMODE}/usermode/genassym.cf
131.1Sjmcneill
141.1Sjmcneill##
151.1Sjmcneill## (2) compile settings
161.1Sjmcneill##
171.6SjmcneillDEFCOPTS=	-O2 -fno-omit-frame-pointer
181.5SjmcneillCPPFLAGS+=	-Dusermode
191.2SjmcneillCPPFLAGS.init_main.c+=	-Dmain=kernmain
201.1Sjmcneill
211.8SjmcneillCPPFLAGS.thunk.c+=	-U_KERNEL -I/usr/include
221.8Sjmcneill
231.1Sjmcneill##
241.1Sjmcneill## (3) libkern and compat
251.1Sjmcneill##
261.1SjmcneillKERN_AS=	obj
271.6SjmcneillCOMPAT_AS=	obj
281.1Sjmcneill
291.1Sjmcneill##
301.1Sjmcneill## (4) local objects, compile rules, and dependencies
311.1Sjmcneill##
321.8SjmcneillMD_OBJS=	thunk.o
331.8SjmcneillMD_CFILES=	${USERMODE}/usermode/thunk.c
341.1SjmcneillMD_SFILES=
351.1Sjmcneill
361.1Sjmcneill##
371.1Sjmcneill## (5) link settings
381.1Sjmcneill##
391.8SjmcneillSYSTEM_LD=	@${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
401.6Sjmcneill		${_MKSHECHO}\
411.6Sjmcneill		${CC} ${COPTS} -Wl,-Map,$@.map -o $@ '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o; \
421.6Sjmcneill		${CC} ${COPTS} -Wl,-Map,$@.map -o $@ ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
431.7SjmcneillNVFLAGS=	-n
441.1Sjmcneill
451.1Sjmcneill##
461.1Sjmcneill## (6) port specific target dependencies
471.1Sjmcneill##
481.1Sjmcneill
491.9Sjmcneill.if !make(obj) && !make(clean) && !make(cleandir)
501.9Sjmcneill.BEGIN:
511.9Sjmcneill	@rm -f i386 && \
521.9Sjmcneill		ln -s $S/arch/i386/include i386
531.9Sjmcneill.endif
541.9Sjmcneill
551.8Sjmcneillthunk.o: ${USERMODE}/usermode/thunk.c
561.8Sjmcneill	${CC} ${COPTS} -I${.CURDIR} -c -o $@ ${USERMODE}/usermode/thunk.c
571.8Sjmcneill
581.1Sjmcneill##
591.1Sjmcneill## (7) misc settings
601.1Sjmcneill##
611.1Sjmcneill
621.1Sjmcneill##
631.1Sjmcneill## (8) config(8) generated machinery
641.1Sjmcneill%INCLUDES
651.1Sjmcneill
661.1Sjmcneill%OBJS
671.1Sjmcneill
681.1Sjmcneill%CFILES
691.1Sjmcneill
701.1Sjmcneill%SFILES
711.1Sjmcneill
721.1Sjmcneill%LOAD
731.1Sjmcneill
741.1Sjmcneill%RULES
751.1Sjmcneill
761.1Sjmcneill##
771.1Sjmcneill## (9) port independent kernel machinery
781.1Sjmcneill##
791.1Sjmcneill.include "$S/conf/Makefile.kern.inc"
801.1Sjmcneill
811.1Sjmcneill##
821.1Sjmcneill## (10) appending make options
831.1Sjmcneill##
841.1Sjmcneill%MAKEOPTIONSAPPEND
85