Makefile.i386 revision 1.168
11.168Sjoerg#	$NetBSD: Makefile.i386,v 1.168 2011/01/12 23:12:12 joerg Exp $
21.62Smycroft
31.8Scgd# Makefile for NetBSD
41.1Scgd#
51.1Scgd# This makefile is constructed from a machine description:
61.1Scgd#	config machineid
71.1Scgd# Most changes should be made in the machine description
81.36Sderaadt#	/sys/arch/i386/conf/``machineid''
91.1Scgd# after which you should do
101.62Smycroft#	config machineid
111.62Smycroft# Machine generic makefile changes should be made in
121.36Sderaadt#	/sys/arch/i386/conf/Makefile.i386
131.42Smycroft# after which config should be rerun for all machines of that type.
141.119Satatat#
151.120Slukem# To specify debugging, add the config line: makeoptions DEBUG="-g"
161.119Satatat# A better way is to specify -g only for a few files.
171.119Satatat#
181.119Satatat#	makeoptions DEBUGLIST="uvm* trap if_*"
191.117Sthorpej
201.119SatatatMACHINE_ARCH=	i386
211.118SjmcUSETOOLS?=	no
221.119SatatatNEED_OWN_INSTALL_TARGET?=no
231.119Satatat.include <bsd.own.mk>
241.42Smycroft
251.166StronUSE_SSP?=	yes
261.166Stron
271.119Satatat##
281.119Satatat## (1) port identification
291.119Satatat##
301.119SatatatI386=		$S/arch/i386
311.138SchristosGENASSYM_CONF=	${I386}/i386/genassym.cf
321.119Satatat
331.119Satatat##
341.119Satatat## (2) compile settings
351.119Satatat##
361.121SatatatCPPFLAGS+=	-Di386
371.168SjoergAFLAGS+=	-x assembler-with-cpp
381.97Schristos
391.119Satatat##
401.120Slukem## (3) libkern and compat
411.119Satatat##
421.164ScubeOPT_MODULAR=	%MODULAR%
431.163Sapb.if !empty(OPT_MODULAR)
441.119SatatatKERN_AS=	obj
451.137Sdsl.else
461.137SdslKERN_AS=	library
471.137Sdsl.endif
481.62Smycroft
491.119Satatat##
501.119Satatat## (4) local objects, compile rules, and dependencies
511.119Satatat##
521.150SchristosMD_OBJS=	locore.o copy.o spl.o vector.o lock_stubs.o
531.119SatatatMD_CFILES=
541.141SyamtMD_SFILES=	${I386}/i386/locore.S ${I386}/i386/copy.S ${I386}/i386/spl.S \
551.150Schristos		${I386}/i386/vector.S ${I386}/i386/lock_stubs.S
561.1Scgd
571.125Sfvdllocore.o: ${I386}/i386/locore.S assym.h
581.125Sfvdl	${NORMAL_S}
591.125Sfvdl
601.141Syamtcopy.o: ${I386}/i386/copy.S assym.h
611.141Syamt	${NORMAL_S}
621.141Syamt
631.125Sfvdlspl.o: ${I386}/i386/spl.S assym.h
641.125Sfvdl	${NORMAL_S}
651.125Sfvdl
661.125Sfvdlvector.o: ${I386}/i386/vector.S assym.h
671.129Schristos	${NORMAL_S}
681.129Schristos
691.150Schristoslock_stubs.o: ${I386}/i386/lock_stubs.S assym.h
701.150Schristos	${NORMAL_S}
711.150Schristos
721.119Satatat##
731.119Satatat## (5) link settings
741.119Satatat##
751.116SthorpejTEXTADDR?=	c0100000
761.122SatatatLINKFLAGS_NORMAL=	-X
771.111SthorpejKERN_LDSCRIPT?=	kern.ldscript
781.119SatatatLINKFORMAT=	-T ${I386}/conf/${KERN_LDSCRIPT}
791.107Sthorpej
801.119Satatat##
811.119Satatat## (6) port specific target dependencies
821.119Satatat##
831.98Smrg
841.161Sjoergfreebsd_sigcode.o i386func.o ibcs2_sigcode.o linux_support.o: assym.h
851.161Sjoerglinux_sigcode.o lock_stubs.o svr4_sigcode.o mach_sigcode.o: assym.h
861.158Sjoergapmcall.o cpufunc.o cpu_in_cksum.o pnpbioscall.o bioscall.o: assym.h
871.132Ssimonbmptramp.o: assym.h
881.154Sjmcneillacpi_wakeup_low.o busfunc.o kvm86call.o: assym.h
891.119Satatat
901.119Satatat##
911.119Satatat## (7) misc settings
921.119Satatat##
931.119Satatat
941.165Stsutsui.if !make(obj) && !make(clean) && !make(cleandir)
951.159Smrg.BEGIN:
961.159Smrg	@rm -f i386 && \
971.159Smrg		ln -s $S/arch/i386/include i386
981.159Smrg.endif
991.159Smrg
1001.119Satatat##
1011.119Satatat## (8) config(8) generated machinery
1021.119Satatat##
1031.98Smrg%INCLUDES
1041.74Smycroft
1051.1Scgd%OBJS
1061.1Scgd
1071.1Scgd%CFILES
1081.1Scgd
1091.62Smycroft%SFILES
1101.62Smycroft
1111.1Scgd%LOAD
1121.50Smycroft
1131.119Satatat%RULES
1141.1Scgd
1151.162Salc## Include rules for ACPI wakecode
1161.154Sjmcneill.include "$S/arch/x86/acpi/Makefile.wakecode.inc"
1171.133Sjmc
1181.119Satatat##
1191.119Satatat## (9) port independent kernel machinery
1201.119Satatat##
1211.119Satatat.include "$S/conf/Makefile.kern.inc"
1221.135Sthorpej
1231.135Sthorpej##
1241.135Sthorpej## (10) Appending make options.
1251.135Sthorpej##
1261.135Sthorpej%MAKEOPTIONSAPPEND
127