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