Makefile.arm revision 1.23
11.23Ssimonb#	$NetBSD: Makefile.arm,v 1.23 2005/01/11 08:41:07 simonb Exp $
21.1Smatt
31.1Smatt# Makefile for NetBSD
41.1Smatt#
51.1Smatt# This makefile is constructed from a machine description:
61.1Smatt#	config machineid
71.1Smatt# Most changes should be made in the machine description
81.1Smatt#	/sys/arch/<arch>/conf/``machineid''
91.1Smatt# after which you should do
101.1Smatt#	config machineid
111.1Smatt# Machine generic makefile changes should be made in
121.1Smatt#	/sys/arch/arm/conf/Makefile.arm
131.1Smatt# after which config should be rerun for all machines of that type.
141.15Satatat#
151.15Satatat# To specify debugging, add the config line: makeoptions DEBUG="-g"
161.15Satatat# A better way is to specify -g only for a few files.
171.15Satatat#
181.15Satatat#	makeoptions DEBUGLIST="uvm* trap if_*"
191.10Sjmc
201.10SjmcUSETOOLS?=	no
211.15SatatatNEED_OWN_INSTALL_TARGET?=no
221.8Sthorpej.include <bsd.own.mk>
231.1Smatt
241.15Satatat##
251.15Satatat## (1) port identification
261.15Satatat##
271.15SatatatTHISARM=	$S/arch/${MACHINE}
281.15SatatatARM=		$S/arch/arm
291.15SatatatARM32=		$S/arch/arm32
301.15SatatatGENASSYM=	${ARM}/arm32/genassym.cf
311.15Satatat.-include "$S/arch/${MACHINE}/conf/Makefile.${MACHINE}.inc"
321.1Smatt
331.15Satatat##
341.15Satatat## (2) compile settings
351.15Satatat##
361.18Sthorpej# CPPFLAGS set by platform-specific Makefile fragment.
371.15SatatatAFLAGS+=	-x assembler-with-cpp
381.15Satatat
391.15Satatat##
401.15Satatat## (3) libkern and compat
411.15Satatat##
421.15SatatatKERN_AS=	obj
431.1Smatt
441.15Satatat##
451.15Satatat## (4) local objects, compile rules, and dependencies
461.15Satatat##
471.15SatatatMD_OBJS=	${SYSTEM_FIRST_OBJ} locore.o
481.15SatatatMD_CFILES=
491.15SatatatMD_SFILES=	${SYSTEM_FIRST_SFILE} ${ARM}/arm32/locore.S
501.7Smatt
511.15Satatat.if defined(SYSTEM_FIRST_OBJ)
521.15Satatat${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h
531.15Satatat	${NORMAL_S}
541.7Smatt.endif
551.1Smatt
561.15Satatatlocore.o: ${ARM}/arm32/locore.S assym.h
571.15Satatat	${NORMAL_S}
581.1Smatt
591.15Satatat##
601.15Satatat## (5) link settings
611.15Satatat##
621.3SmattLOADADDRESS?=	0xF0000000
631.15SatatatLINKFLAGS_NORMAL=	-X
641.1Smatt
651.15Satatat##
661.15Satatat## (6) port specific target dependencies
671.15Satatat##
681.1Smatt
691.15Satatat# depend on CPU configuration
701.15Satatatcpufunc.o cpufunc_asm.o: Makefile
711.1Smatt
721.15Satatat# depend on DIAGNOSTIC etc.
731.15Satatatcpuswitch.o fault.o machdep.o: Makefile
741.1Smatt
751.22Ssimonb# various assembly files that depend on assym.h
761.22Ssimonbatomic.o bcopy_page.o bcopyinout.o copystr.o cpuswitch.o exception.o: assym.h
771.23Ssimonbfiq_subr.o fusu.o in_cksum_arm.o irq_dispatch.o isa_irq.o sigcode.o: assym.h
781.23Ssimonbspl.o vectors.o: assym.h
791.22Ssimonb
801.15Satatat##
811.15Satatat## (7) misc settings
821.15Satatat##
831.19Sskrll
841.19Sskrll# XXX gcc 3.3 generates incorrect code without this
851.19Sskrll# XXX see PR 23044
861.20SskrllCOPTS.uipc_socket.c+=	-fno-strict-aliasing
871.15Satatat
881.15Satatat##
891.15Satatat## (8) config(8) generated machinery
901.15Satatat##
911.15Satatat%INCLUDES
921.1Smatt
931.1Smatt%OBJS
941.1Smatt
951.1Smatt%CFILES
961.1Smatt
971.1Smatt%SFILES
981.1Smatt
991.1Smatt%LOAD
1001.1Smatt
1011.15Satatat%RULES
1021.1Smatt
1031.15Satatat##
1041.15Satatat## (9) port independent kernel machinery
1051.15Satatat##
1061.15Satatat.include "$S/conf/Makefile.kern.inc"
1071.21Sthorpej
1081.21Sthorpej##
1091.21Sthorpej## (10) Appending make options.
1101.21Sthorpej##
1111.21Sthorpej%MAKEOPTIONSAPPEND
112