Home | History | Annotate | Line # | Download | only in conf
Makefile.powerpc revision 1.26
      1 #	$NetBSD: Makefile.powerpc,v 1.26 2003/02/19 23:55:48 matt 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=	${THISPPC}/${MACHINE}/genassym.cf
     32 .else
     33 GENASSYM=	${POWERPC}/${PPCDIR}/genassym.cf
     34 .endif
     35 .-include "${THISPPC}/conf/Makefile.${MACHINE}.inc"
     36 
     37 ##
     38 ## (2) compile settings
     39 ##
     40 CPPFLAGS+=	-D${MACHINE}
     41 CWARNFLAGS+=	-Wreturn-type
     42 CFLAGS+=	-msoft-float ${CCPUOPTS}
     43 AFLAGS+=	${AOPTS}
     44 
     45 ##
     46 ## (3) libkern and compat
     47 ##
     48 KERN_AS=	obj
     49 
     50 ##
     51 ## (4) local objects, compile rules, and dependencies
     52 ##
     53 .if !defined(SYSTEM_FIRST_OBJ)
     54 SYSTEM_FIRST_OBJ= locore.o
     55 .endif
     56 .if !defined(SYSTEM_FIRST_SFILE)
     57 SYSTEM_FIRST_SFILE= ${THISPPC}/${MACHINE}/locore.S
     58 .endif
     59 MD_OBJS=	${SYSTEM_FIRST_OBJ}
     60 MD_CFILES=
     61 MD_SFILES=	${SYSTEM_FIRST_SFILE}
     62 
     63 ${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h
     64 	${NORMAL_S}
     65 
     66 ##
     67 ## (5) link settings
     68 ##
     69 TEXTADDR?=	0x100000
     70 LINKFORMAT=	-N
     71 ENTRYPOINT=	__start
     72 
     73 .if defined(NEED_SYMTAB)
     74 SYSTEM_LD_TAIL_EXTRA=; \
     75 		echo ${DBSYM} $@; \
     76 		${DBSYM} $@
     77 .endif
     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 ##
     97 ## (7) misc settings
     98 ##
     99 
    100 ##
    101 ## (8) config(8) generated machinery
    102 ##
    103 %INCLUDES
    104 
    105 %OBJS
    106 
    107 %CFILES
    108 
    109 %SFILES
    110 
    111 %LOAD
    112 
    113 %RULES
    114 
    115 ##
    116 ## (9) port independent kernel machinery
    117 ##
    118 .include "$S/conf/Makefile.kern.inc"
    119