Home | History | Annotate | Line # | Download | only in conf
Makefile.powerpc revision 1.40.12.2
      1 #	$NetBSD: Makefile.powerpc,v 1.40.12.2 2009/03/03 18:29:05 skrll Exp $
      2 #
      3 # Makefile for NetBSD
      4 #
      5 # This makefile is constructed from a machine description:
      6 #	config machineid
      7 # Most changes should be made in the machine description
      8 #	/sys/arch/powerpc/conf/``machineid''
      9 # after which you should do
     10 #	config machineid
     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.
     14 #
     15 # To specify debugging, add the config line: makeoptions DEBUG="-g"
     16 # A better way is to specify -g only for a few files.
     17 #
     18 #	makeoptions DEBUGLIST="uvm* trap if_*"
     19 
     20 MACHINE_ARCH=powerpc
     21 USETOOLS?=	no
     22 NEED_OWN_INSTALL_TARGET?=no
     23 .include <bsd.own.mk>
     24 
     25 ##
     26 ## (1) port identification
     27 ##
     28 THISPPC=	$S/arch/${MACHINE}
     29 POWERPC=	$S/arch/powerpc
     30 .if exists(${THISPPC}/${MACHINE}/genassym.cf)
     31 GENASSYM_CONF=	${THISPPC}/${MACHINE}/genassym.cf
     32 .else
     33 GENASSYM_CONF=	${POWERPC}/${PPCDIR}/genassym.cf
     34 .endif
     35 .-include "${THISPPC}/conf/Makefile.${MACHINE}.inc"
     36 
     37 ##
     38 ## (2) compile settings
     39 ##
     40 CPPFLAGS+=	-D${MACHINE}=${MACHINE}
     41 CWARNFLAGS+=	-Wreturn-type
     42 .if ${PPCDIR} == "oea"
     43 CFLAGS+=	-mno-strict-align
     44 .endif
     45 CFLAGS+=	-msoft-float ${CCPUOPTS} -Wa,-maltivec
     46 AFLAGS+=	${AOPTS}
     47 
     48 ##
     49 ## (3) libkern and compat
     50 ##
     51 OPT_MODULAR=	%MODULAR%
     52 .if !empty(OPT_MODULAR)
     53 KERN_AS=	obj
     54 .endif
     55 
     56 ##
     57 ## (4) local objects, compile rules, and dependencies
     58 ##
     59 .if !defined(SYSTEM_FIRST_OBJ)
     60 SYSTEM_FIRST_OBJ= locore.o
     61 .endif
     62 .if !defined(SYSTEM_FIRST_SFILE)
     63 SYSTEM_FIRST_SFILE= ${THISPPC}/${MACHINE}/locore.S
     64 .endif
     65 MD_OBJS=	${SYSTEM_FIRST_OBJ}
     66 MD_CFILES=
     67 MD_SFILES=	${SYSTEM_FIRST_SFILE}
     68 
     69 ${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h
     70 	${NORMAL_S}
     71 
     72 ##
     73 ## (5) link settings
     74 ##
     75 TEXTADDR?=	0x100000
     76 LINKFORMAT=	-N
     77 ENTRYPOINT=	__start
     78 
     79 .if defined(NEED_SREC)
     80 SYSTEM_LD_TAIL_EXTRA+=; \
     81 		${OBJCOPY} -v -O srec $@ $@.srec
     82 .endif
     83 
     84 .if defined(NEED_BINARY)
     85 SYSTEM_LD_TAIL_EXTRA+=; \
     86 		${OBJCOPY} -v -O binary $@ $@.bin
     87 .endif
     88 
     89 ##
     90 ## (6) port specific target dependencies
     91 ##
     92 
     93 # depend on CPU configuration
     94 locore.o machdep.o: Makefile
     95 
     96 lock_stubs.o setfault.o: assym.h
     97 
     98 ##
     99 ## (7) misc settings
    100 ##
    101 
    102 ##
    103 ## (8) config(8) generated machinery
    104 ##
    105 %INCLUDES
    106 
    107 %OBJS
    108 
    109 %CFILES
    110 
    111 %SFILES
    112 
    113 %LOAD
    114 
    115 %RULES
    116 
    117 ##
    118 ## (9) port independent kernel machinery
    119 ##
    120 .include "$S/conf/Makefile.kern.inc"
    121 ${KERNLIB} ${KERNLIB_PROF} ${KERNLIBLN}: assym.h
    122 
    123 ##
    124 ## (10) Appending make options.
    125 ##
    126 %MAKEOPTIONSAPPEND
    127