1 # $NetBSD: Makefile.macppc,v 1.32 2009/02/14 16:53:55 apb Exp $
5 # This makefile is constructed from a machine description:
7 # Most changes should be made in the machine description
8 # /sys/arch/powerpc/conf/``machineid''
9 # after which you should do
11 # Machine generic makefile changes should be made in
12 # /sys/arch/powerpc/conf/Makefile.powerpc
13 # after which config should be rerun for all machines of that type.
15 # To specify debugging, add the config line: makeoptions DEBUG="-g"
16 # A better way is to specify -g only for a few files.
18 # makeoptions DEBUGLIST="uvm* trap if_*"
22 NEED_OWN_INSTALL_TARGET?=no
26 ## (1) port identification
28 THISPPC= $S/arch/${MACHINE}
29 POWERPC= $S/arch/powerpc
30 .if exists(${THISPPC}/${MACHINE}/genassym.cf)
31 GENASSYM_CONF= ${THISPPC}/${MACHINE}/genassym.cf
33 GENASSYM_CONF= ${POWERPC}/${PPCDIR}/genassym.cf
35 .-include "${THISPPC}/conf/Makefile.${MACHINE}.inc"
38 ## (2) compile settings
40 CPPFLAGS+= -D${MACHINE}=${MACHINE}
41 CWARNFLAGS+= -Wreturn-type
42 .if ${PPCDIR} == "oea"
43 CFLAGS+= -mno-strict-align
46 .if ${PPC_ARCH_MODE} == "ppc64bridge"
47 AOPTS+= -Wa,-mppc64bridge
50 CFLAGS+= -msoft-float ${CCPUOPTS} -Wa,-maltivec
54 ## (3) libkern and compat
56 OPT_MODULAR= %MODULAR%
57 .if !empty(OPT_MODULAR)
62 ## (4) local objects, compile rules, and dependencies
64 .if !defined(SYSTEM_FIRST_OBJ)
65 SYSTEM_FIRST_OBJ= locore.o
67 .if !defined(SYSTEM_FIRST_SFILE)
68 SYSTEM_FIRST_SFILE= ${THISPPC}/${MACHINE}/locore.S
70 MD_OBJS= ${SYSTEM_FIRST_OBJ}
72 MD_SFILES= ${SYSTEM_FIRST_SFILE}
74 ${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h
84 .if defined(NEED_SREC)
85 SYSTEM_LD_TAIL_EXTRA+=; \
86 ${OBJCOPY} -v -O srec $@ $@.srec
89 .if defined(NEED_BINARY)
90 SYSTEM_LD_TAIL_EXTRA+=; \
91 ${OBJCOPY} -v -O binary $@ $@.bin
95 ## (6) port specific target dependencies
98 # depend on CPU configuration
99 locore.o machdep.o: Makefile
101 lock_stubs.o setfault.o: assym.h
108 ## (8) config(8) generated machinery
123 ## (9) port independent kernel machinery
125 .include "$S/conf/Makefile.kern.inc"
128 ## (10) Appending make options.