Makefile.sun2 revision 1.12
11.12Sthorpej# $NetBSD: Makefile.sun2,v 1.12 2002/01/28 21:29:46 thorpej Exp $
21.1Sfredette
31.1Sfredette# Makefile for NetBSD
41.1Sfredette#
51.1Sfredette# This makefile is constructed from a machine description:
61.1Sfredette#	config machineid
71.1Sfredette# Most changes should be made in the machine description
81.1Sfredette#	/sys/arch/sun2/conf/``machineid''
91.1Sfredette# after which you should do
101.1Sfredette#	config machineid
111.1Sfredette# Machine generic makefile changes should be made in
121.1Sfredette#	/sys/arch/sun2/conf/Makefile.sun2
131.1Sfredette# after which config should be rerun for all machines of that type.
141.1Sfredette#
151.11Sfredette# To specify debugging, add the config line: makeoptions DEBUG="-g"
161.11Sfredette# A better way is to specify -g only for a few files.
171.1Sfredette#
181.11Sfredette#	makeoptions DEBUGLIST="uvm* trap if_*"
191.1Sfredette
201.7SjmcUSETOOLS?=	no
211.11SfredetteNEED_OWN_INSTALL_TARGET?=no
221.7Sjmc.include <bsd.own.mk>
231.6Sthorpej
241.11Sfredette##
251.11Sfredette## (1) port identification
261.11Sfredette##
271.11SfredetteSUN2=		$S/arch/sun2
281.11SfredetteGENASSYM=	${SUN2}/sun2/genassym.cf
291.11Sfredette
301.11Sfredette##
311.11Sfredette## (2) compile settings
321.11Sfredette##
331.1Sfredette# Override CPP defaults entirely, so cross-compilation works.
341.1Sfredette# Keep -nostdinc before all -I flags, similar for -undef ...
351.12SthorpejCPPFLAGS+=	-Dsun2
361.11SfredetteCFLAGS+=	-msoft-float -fno-defer-pop
371.1SfredetteAPPFLAGS=	-x assembler-with-cpp -P -traditional ${CPPFLAGS} -D_LOCORE
381.1Sfredette
391.11Sfredette# Do NOT assume the compiler does "-x funny_format" (gcc-specific)
401.11Sfredette# This needs an intermediate file.  The original file is always
411.11Sfredette# safe in some far away directory, so just use the base name.
421.11SfredetteNORMAL_S=	${CPP} ${APPFLAGS} $< > $*.s ;\
431.11Sfredette		${AS} -o $@ $*.s ; rm $*.s
441.1Sfredette
451.11Sfredette##
461.11Sfredette## (3) libkern and compat
471.11Sfredette##
481.1SfredetteKERN_AS=	obj
491.4Sfredette# XXX lib/libkern/arch/m68k/Makefile.inc needs to know that
501.4Sfredette# XXX our MACHINE_ARCH is m68000, and not m68k.  --fredette
511.2SfredetteKERNMISCMAKEFLAGS=	MACHINE_ARCH=${MACHINE_ARCH}
521.1Sfredette
531.11Sfredette##
541.11Sfredette## (4) local objects, compile rules, and dependencies
551.11Sfredette##
561.11SfredetteMD_OBJS=	locore.o
571.11SfredetteMD_CFILES=
581.11SfredetteMD_SFILES=	${SUN2}/sun2/locore.s
591.1Sfredette
601.11Sfredettelocore.o: ${SUN2}/sun2/locore.s
611.11Sfredette	${NORMAL_S}
621.1Sfredette
631.11Sfredette##
641.11Sfredette## (5) link settings
651.11Sfredette##
661.11SfredetteLINKFORMAT=	-N
671.11SfredetteTEXTADDR?=	00006000
681.11Sfredette
691.11Sfredette##
701.11Sfredette## (6) port specific target dependencies
711.11Sfredette##
721.1Sfredette
731.1Sfredette# For cross-compilation, the "gcc -M" mkdep script is convenient,
741.1Sfredette# but that does not correctly make rules from *.s files.  The
751.1Sfredette# easiest work-around is to just list those dependencies here.
761.1Sfredettelocore.o:   assym.h m68k/asm.h m68k/trap.h
771.1Sfredettecopy.o:     assym.h m68k/asm.h $S/sys/errno.h
781.1Sfredettebcopy.o:    assym.h m68k/asm.h
791.1Sfredettecopypage.o: assym.h m68k/asm.h
801.1Sfredette
811.9Slukem# depend on CPU configuration
821.1Sfredettedb_machdep.o dvma.o machdep.o pmap.o sun2_startup.o vm_machdep.o: Makefile
831.1Sfredette
841.1Sfredette# depends on DDB, etc.
851.1Sfredettestub.o: Makefile
861.1Sfredette
871.11Sfredette##
881.11Sfredette## (7) misc settings
891.11Sfredette##
901.11SfredetteMKDEP_AFLAGS=	${APPFLAGS}
911.11Sfredette
921.11Sfredette##
931.11Sfredette## (8) config(8) generated machinery
941.11Sfredette##
951.11Sfredette%INCLUDES
961.11Sfredette
971.11Sfredette%OBJS
981.11Sfredette
991.11Sfredette%CFILES
1001.1Sfredette
1011.11Sfredette%SFILES
1021.1Sfredette
1031.11Sfredette%LOAD
1041.1Sfredette
1051.1Sfredette%RULES
1061.11Sfredette
1071.11Sfredette##
1081.11Sfredette## (9) port independent kernel machinery
1091.11Sfredette##
1101.11Sfredette.include "$S/conf/Makefile.kern.inc"
111