Makefile.powerpc revision 757
14Srgrimes# Copyright 1990 W. Jolitz 2509Srgrimes# from: @(#)Makefile.i386 7.1 5/10/91 3757Sdg# $Id: Makefile.i386,v 1.12 1993/11/07 16:46:33 wollman Exp $ 44Srgrimes# 5509Srgrimes# Makefile for FreeBSD 6509Srgrimes# 74Srgrimes# This makefile is constructed from a machine description: 84Srgrimes# config machineid 94Srgrimes# Most changes should be made in the machine description 104Srgrimes# /sys/i386/conf/``machineid'' 114Srgrimes# after which you should do 124Srgrimes# config machineid 134Srgrimes# Generic makefile changes should be made in 144Srgrimes# /sys/i386/conf/Makefile.i386 154Srgrimes# after which config should be rerun for all machines. 164Srgrimes# 174Srgrimes# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE INVISIBLE TO MAKEFILE 184Srgrimes# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 194Srgrimes# 204Srgrimes# -DTRACE compile in kernel tracing hooks 214Srgrimes# -DQUOTA compile in file system quotas 224Srgrimes# 234SrgrimesTOUCH= touch -f -c 244SrgrimesLD= /usr/bin/ld 254SrgrimesCC= cc 264SrgrimesCPP= cpp 27509SrgrimesSTRIP= strip 28509SrgrimesDBSYM= /usr/sbin/dbsym 294Srgrimes 304SrgrimesS= ../.. 314SrgrimesI386= ../../i386 324Srgrimes 33712SwollmanCWARNFLAGS= 34712SwollmanCOPTFLAGS=-O 354SrgrimesINCLUDES= -I. -I$S -I$S/sys 364SrgrimesCOPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX 374SrgrimesASFLAGS= 38712SwollmanCFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} 39509SrgrimesLOAD_ADDRESS?= FE000000 404Srgrimes 414SrgrimesNORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 424SrgrimesNORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 434SrgrimesNORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o 444SrgrimesDRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< 454SrgrimesDRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 46757SdgSYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \ 47757Sdg ioconf.o conf.o machdep.o 484SrgrimesSYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} 494SrgrimesSYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 50509SrgrimesSYSTEM_LD= @${LD} -z -T ${LOAD_ADDRESS} -o $@ -X vers.o ${SYSTEM_OBJS} 514SrgrimesSYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \ 52509Srgrimes ${DBSYM} -fT ${LOAD_ADDRESS} $@; ${STRIP} -x $@; size $@; chmod 755 $@ 534Srgrimes 54509Srgrimes# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and 55509Srgrimes# the script is identical for either... -- cgd 56509Srgrimes# 574SrgrimesGPROF.EX= /usr/src/lib/csu.i386/gprof.ex 584SrgrimesPROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \ 59509Srgrimes ed - $*.s < ${GPROF.EX} ; \ 604Srgrimes ${AS} -o $@ $*.s ; \ 614Srgrimes rm -f $*.s 624Srgrimes 634Srgrimes%OBJS 644Srgrimes 654Srgrimes%CFILES 664Srgrimes 674Srgrimes%LOAD 684Srgrimes 694Srgrimesclean: 704Srgrimes rm -f eddep *386bsd tags *.o locore.i [a-uw-z]*.s \ 71715Swollman errs linterrs makelinks genassym ,assym.s stamp-assym 724Srgrimes 73715Swollman#lint: /tmp param.c 74715Swollman# @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \ 75715Swollman# ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \ 76715Swollman# grep -v 'struct/union .* never defined' | \ 77715Swollman# grep -v 'possible pointer alignment problem' 784Srgrimes 794Srgrimessymbols.sort: ${I386}/i386/symbols.raw 804Srgrimes grep -v '^#' ${I386}/i386/symbols.raw \ 814Srgrimes | sed 's/^ //' | sort -u > symbols.sort 824Srgrimes 834Srgrimeslocore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \ 844Srgrimes machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \ 854Srgrimes $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \ 86757Sdg ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \ 87757Sdg machine/asmacros.h 884Srgrimes ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \ 894Srgrimes ${AS} ${ASFLAGS} -o locore.o 904Srgrimes 91757Sdgexception.o: assym.s ${I386}/i386/exception.s machine/trap.h \ 92757Sdg ${I386}/isa/vector.s ${I386}/isa/icu.s \ 93757Sdg $S/sys/errno.h ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h \ 94757Sdg $S/net/netisr.h machine/asmacros.h 95757Sdg ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/exception.s | \ 96757Sdg ${AS} ${ASFLAGS} -o exception.o 97757Sdg 98757Sdgswtch.o: assym.s ${I386}/i386/swtch.s \ 99757Sdg $S/sys/errno.h ${I386}/isa/debug.h machine/asmacros.h 100757Sdg ${CPP} -I. ${COPTS} ${I386}/i386/swtch.s | \ 101757Sdg ${AS} ${ASFLAGS} -o swtch.o 102757Sdg 103757Sdgsupport.o: assym.s ${I386}/i386/support.s \ 104757Sdg $S/sys/errno.h machine/asmacros.h 105757Sdg ${CPP} -I. ${COPTS} ${I386}/i386/support.s | \ 106757Sdg ${AS} ${ASFLAGS} -o support.o 107757Sdg 108509Srgrimesmachdep.o: ${I386}/i386/machdep.c Makefile 109509Srgrimes ${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $< 110509Srgrimes 1114Srgrimes# the following is necessary because autoconf.o depends on #if GENERIC 1124Srgrimesautoconf.o: Makefile 1134Srgrimes 1144Srgrimes# depend on network configuration 1154Srgrimesaf.o uipc_proto.o locore.o: Makefile 1164Srgrimes 1174Srgrimes# depends on KDB (cons.o also depends on GENERIC) 1184Srgrimestrap.o cons.o: Makefile 1194Srgrimes 120649Snateassym.s: genassym 121715Swollman ./genassym >,assym.s 122715Swollman if cmp -s assym.s ,assym.s; then \ 123715Swollman rm -f ,assym.s; \ 124715Swollman else \ 125715Swollman rm -f assym.s; \ 126715Swollman mv ,assym.s assym.s; \ 127715Swollman fi 1284Srgrimes 129715Swollman# Some of the defines that genassym outputs may well depend on the 130715Swollman# value of kernel options. 131715Swollmangenassym: Makefile 1324Srgrimes ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \ 133648Snate ${I386}/i386/genassym.c -o genassym 1344Srgrimes 1354Srgrimesdepend: assym.s param.c 136509Srgrimes sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c 1374Srgrimes sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c 1384Srgrimes 1394Srgrimeslinks: 1404Srgrimes egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1414Srgrimes sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1424Srgrimes echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1434Srgrimes sort -u | comm -23 - dontlink | \ 1444Srgrimes sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 1454Srgrimes sh makelinks && rm -f dontlink 1464Srgrimes 1474Srgrimestags: 1484Srgrimes @echo "see $S/kern/Makefile for tags" 1494Srgrimes 1504Srgrimesioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \ 1514Srgrimes ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h 1524Srgrimes ${CC} -c ${CFLAGS} ioconf.c 1534Srgrimes 154509Srgrimesconf.o: ${I386}/i386/conf.c 1554Srgrimes ${CC} -traditional -c ${CFLAGS} ${I386}/i386/conf.c 1564Srgrimes 157509Srgrimesparam.c: $S/conf/param.c 1584Srgrimes -rm -f param.c 1594Srgrimes cp $S/conf/param.c . 1604Srgrimes 1614Srgrimesparam.o: param.c Makefile 1624Srgrimes ${CC} -c ${CFLAGS} ${PARAM} param.c 1634Srgrimes 164509Srgrimesvers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 1654Srgrimes sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 1664Srgrimes ${CC} ${CFLAGS} -c vers.c 1674Srgrimes 1684Srgrimes%RULES 1694Srgrimes 1704Srgrimes# DO NOT DELETE THIS LINE -- make depend uses it 1714Srgrimes 172