1 1.19.2.5 nathanw # $NetBSD: Makefile.powerpc,v 1.19.2.5 2002/06/20 03:40:31 nathanw Exp $ 2 1.19.2.2 nathanw # 3 1.19.2.2 nathanw # Makefile for NetBSD 4 1.19.2.2 nathanw # 5 1.19.2.2 nathanw # This makefile is constructed from a machine description: 6 1.19.2.2 nathanw # config machineid 7 1.19.2.2 nathanw # Most changes should be made in the machine description 8 1.19.2.2 nathanw # /sys/arch/powerpc/conf/``machineid'' 9 1.19.2.2 nathanw # after which you should do 10 1.19.2.2 nathanw # config machineid 11 1.19.2.2 nathanw # Machine generic makefile changes should be made in 12 1.19.2.2 nathanw # /sys/arch/powerpc/conf/Makefile.powerpc 13 1.19.2.2 nathanw # after which config should be rerun for all machines of that type. 14 1.19.2.2 nathanw # 15 1.19.2.2 nathanw # To specify debugging, add the config line: makeoptions DEBUG="-g" 16 1.19.2.2 nathanw # A better way is to specify -g only for a few files. 17 1.19.2.2 nathanw # 18 1.19.2.2 nathanw # makeoptions DEBUGLIST="uvm* trap if_*" 19 1.19.2.2 nathanw 20 1.19.2.2 nathanw MACHINE_ARCH=powerpc 21 1.19.2.2 nathanw USETOOLS?= no 22 1.19.2.2 nathanw NEED_OWN_INSTALL_TARGET?=no 23 1.19.2.2 nathanw .include <bsd.own.mk> 24 1.19.2.2 nathanw 25 1.19.2.2 nathanw ## 26 1.19.2.2 nathanw ## (1) port identification 27 1.19.2.2 nathanw ## 28 1.19.2.2 nathanw THISPPC= $S/arch/${MACHINE} 29 1.19.2.2 nathanw POWERPC= $S/arch/powerpc 30 1.19.2.5 nathanw .if exists(${THISPPC}/${MACHINE}/genassym.cf) 31 1.19.2.2 nathanw GENASSYM= ${THISPPC}/${MACHINE}/genassym.cf 32 1.19.2.5 nathanw .else 33 1.19.2.5 nathanw GENASSYM= ${POWERPC}/${PPCDIR}/genassym.cf 34 1.19.2.5 nathanw .endif 35 1.19.2.2 nathanw .-include "${THISPPC}/conf/Makefile.${MACHINE}.inc" 36 1.19.2.2 nathanw 37 1.19.2.2 nathanw ## 38 1.19.2.2 nathanw ## (2) compile settings 39 1.19.2.2 nathanw ## 40 1.19.2.2 nathanw CPPFLAGS+= -D${MACHINE} 41 1.19.2.2 nathanw CWARNFLAGS+= -Wreturn-type 42 1.19.2.2 nathanw CFLAGS+= -msoft-float ${CCPUOPTS} 43 1.19.2.2 nathanw AFLAGS+= ${AOPTS} 44 1.19.2.2 nathanw 45 1.19.2.2 nathanw ## 46 1.19.2.2 nathanw ## (3) libkern and compat 47 1.19.2.2 nathanw ## 48 1.19.2.2 nathanw 49 1.19.2.2 nathanw ## 50 1.19.2.2 nathanw ## (4) local objects, compile rules, and dependencies 51 1.19.2.2 nathanw ## 52 1.19.2.2 nathanw MD_OBJS= locore.o 53 1.19.2.2 nathanw MD_CFILES= 54 1.19.2.3 nathanw MD_SFILES= ${THISPPC}/${MACHINE}/locore.S 55 1.19.2.2 nathanw 56 1.19.2.2 nathanw locore.o: ${THISPPC}/${MACHINE}/locore.S assym.h 57 1.19.2.2 nathanw ${NORMAL_S} 58 1.19.2.2 nathanw 59 1.19.2.2 nathanw ## 60 1.19.2.2 nathanw ## (5) link settings 61 1.19.2.2 nathanw ## 62 1.19.2.2 nathanw TEXTADDR?= 0x100000 63 1.19.2.2 nathanw LINKFORMAT= -N 64 1.19.2.2 nathanw ENTRYPOINT= __start 65 1.19.2.2 nathanw 66 1.19.2.2 nathanw .if defined(NEED_SREC) 67 1.19.2.2 nathanw SYSTEM_LD_TAIL_EXTRA=; \ 68 1.19.2.2 nathanw ${OBJCOPY} -v -O srec $@ $@.srec 69 1.19.2.2 nathanw .endif 70 1.19.2.2 nathanw 71 1.19.2.5 nathanw .if defined(NEED_BINARY) 72 1.19.2.5 nathanw SYSTEM_LD_TAIL_EXTRA=; \ 73 1.19.2.5 nathanw ${OBJCOPY} -v -O binary $@ $@.bin 74 1.19.2.5 nathanw .endif 75 1.19.2.5 nathanw 76 1.19.2.2 nathanw ## 77 1.19.2.2 nathanw ## (6) port specific target dependencies 78 1.19.2.2 nathanw ## 79 1.19.2.2 nathanw 80 1.19.2.2 nathanw # depend on CPU configuration 81 1.19.2.2 nathanw locore.o machdep.o: Makefile 82 1.19.2.2 nathanw 83 1.19.2.2 nathanw ## 84 1.19.2.2 nathanw ## (7) misc settings 85 1.19.2.2 nathanw ## 86 1.19.2.2 nathanw 87 1.19.2.2 nathanw ## 88 1.19.2.2 nathanw ## (8) config(8) generated machinery 89 1.19.2.2 nathanw ## 90 1.19.2.2 nathanw %INCLUDES 91 1.19.2.2 nathanw 92 1.19.2.2 nathanw %OBJS 93 1.19.2.2 nathanw 94 1.19.2.2 nathanw %CFILES 95 1.19.2.2 nathanw 96 1.19.2.2 nathanw %SFILES 97 1.19.2.2 nathanw 98 1.19.2.2 nathanw %LOAD 99 1.19.2.2 nathanw 100 1.19.2.2 nathanw %RULES 101 1.19.2.2 nathanw 102 1.19.2.2 nathanw ## 103 1.19.2.2 nathanw ## (9) port independent kernel machinery 104 1.19.2.2 nathanw ## 105 1.19.2.2 nathanw .include "$S/conf/Makefile.kern.inc" 106