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