1 1.19.2.6 nathanw # $NetBSD: Makefile.powerpc,v 1.19.2.6 2002/08/27 23:45:03 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.6 nathanw .if !defined(SYSTEM_FIRST_OBJ) 53 1.19.2.6 nathanw SYSTEM_FIRST_OBJ= locore.o 54 1.19.2.6 nathanw .endif 55 1.19.2.6 nathanw .if !defined(SYSTEM_FIRST_SFILE) 56 1.19.2.6 nathanw SYSTEM_FIRST_SFILE= ${THISPPC}/${MACHINE}/locore.S 57 1.19.2.6 nathanw .endif 58 1.19.2.6 nathanw MD_OBJS= ${SYSTEM_FIRST_OBJ} 59 1.19.2.2 nathanw MD_CFILES= 60 1.19.2.6 nathanw MD_SFILES= ${SYSTEM_FIRST_SFILE} 61 1.19.2.2 nathanw 62 1.19.2.6 nathanw ${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h 63 1.19.2.2 nathanw ${NORMAL_S} 64 1.19.2.2 nathanw 65 1.19.2.2 nathanw ## 66 1.19.2.2 nathanw ## (5) link settings 67 1.19.2.2 nathanw ## 68 1.19.2.2 nathanw TEXTADDR?= 0x100000 69 1.19.2.2 nathanw LINKFORMAT= -N 70 1.19.2.2 nathanw ENTRYPOINT= __start 71 1.19.2.2 nathanw 72 1.19.2.2 nathanw .if defined(NEED_SREC) 73 1.19.2.2 nathanw SYSTEM_LD_TAIL_EXTRA=; \ 74 1.19.2.2 nathanw ${OBJCOPY} -v -O srec $@ $@.srec 75 1.19.2.2 nathanw .endif 76 1.19.2.2 nathanw 77 1.19.2.5 nathanw .if defined(NEED_BINARY) 78 1.19.2.5 nathanw SYSTEM_LD_TAIL_EXTRA=; \ 79 1.19.2.5 nathanw ${OBJCOPY} -v -O binary $@ $@.bin 80 1.19.2.5 nathanw .endif 81 1.19.2.5 nathanw 82 1.19.2.2 nathanw ## 83 1.19.2.2 nathanw ## (6) port specific target dependencies 84 1.19.2.2 nathanw ## 85 1.19.2.2 nathanw 86 1.19.2.2 nathanw # depend on CPU configuration 87 1.19.2.2 nathanw locore.o machdep.o: Makefile 88 1.19.2.2 nathanw 89 1.19.2.2 nathanw ## 90 1.19.2.2 nathanw ## (7) misc settings 91 1.19.2.2 nathanw ## 92 1.19.2.2 nathanw 93 1.19.2.2 nathanw ## 94 1.19.2.2 nathanw ## (8) config(8) generated machinery 95 1.19.2.2 nathanw ## 96 1.19.2.2 nathanw %INCLUDES 97 1.19.2.2 nathanw 98 1.19.2.2 nathanw %OBJS 99 1.19.2.2 nathanw 100 1.19.2.2 nathanw %CFILES 101 1.19.2.2 nathanw 102 1.19.2.2 nathanw %SFILES 103 1.19.2.2 nathanw 104 1.19.2.2 nathanw %LOAD 105 1.19.2.2 nathanw 106 1.19.2.2 nathanw %RULES 107 1.19.2.2 nathanw 108 1.19.2.2 nathanw ## 109 1.19.2.2 nathanw ## (9) port independent kernel machinery 110 1.19.2.2 nathanw ## 111 1.19.2.2 nathanw .include "$S/conf/Makefile.kern.inc" 112