Makefile.powerpc revision 712
14Srgrimes# Copyright 1990 W. Jolitz 2509Srgrimes# from: @(#)Makefile.i386 7.1 5/10/91 3712Swollman# $Id: Makefile.i386,v 1.10 1993/10/23 08:28:17 nate 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} $< 46603SrgrimesSYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o machdep.o 474SrgrimesSYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} 484SrgrimesSYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 49509SrgrimesSYSTEM_LD= @${LD} -z -T ${LOAD_ADDRESS} -o $@ -X vers.o ${SYSTEM_OBJS} 504SrgrimesSYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \ 51509Srgrimes ${DBSYM} -fT ${LOAD_ADDRESS} $@; ${STRIP} -x $@; size $@; chmod 755 $@ 524Srgrimes 53509Srgrimes# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and 54509Srgrimes# the script is identical for either... -- cgd 55509Srgrimes# 564SrgrimesGPROF.EX= /usr/src/lib/csu.i386/gprof.ex 574SrgrimesPROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \ 58509Srgrimes ed - $*.s < ${GPROF.EX} ; \ 594Srgrimes ${AS} -o $@ $*.s ; \ 604Srgrimes rm -f $*.s 614Srgrimes 624Srgrimes%OBJS 634Srgrimes 644Srgrimes%CFILES 654Srgrimes 664Srgrimes%LOAD 674Srgrimes 684Srgrimesclean: 694Srgrimes rm -f eddep *386bsd tags *.o locore.i [a-uw-z]*.s \ 70648Snate errs linterrs makelinks genassym 714Srgrimes 724Srgrimeslint: /tmp param.c 734Srgrimes @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \ 744Srgrimes ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \ 754Srgrimes grep -v 'struct/union .* never defined' | \ 764Srgrimes grep -v 'possible pointer alignment problem' 774Srgrimes 784Srgrimessymbols.sort: ${I386}/i386/symbols.raw 794Srgrimes grep -v '^#' ${I386}/i386/symbols.raw \ 804Srgrimes | sed 's/^ //' | sort -u > symbols.sort 814Srgrimes 824Srgrimeslocore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \ 834Srgrimes machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \ 844Srgrimes $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \ 854Srgrimes ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h 864Srgrimes ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \ 874Srgrimes ${AS} ${ASFLAGS} -o locore.o 884Srgrimes 89509Srgrimesmachdep.o: ${I386}/i386/machdep.c Makefile 90509Srgrimes ${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $< 91509Srgrimes 924Srgrimes# the following is necessary because autoconf.o depends on #if GENERIC 934Srgrimesautoconf.o: Makefile 944Srgrimes 954Srgrimes# depend on network configuration 964Srgrimesaf.o uipc_proto.o locore.o: Makefile 974Srgrimes 984Srgrimes# depend on maxusers 99544Srgrimesassym.s: Makefile 1004Srgrimes 1014Srgrimes# depends on KDB (cons.o also depends on GENERIC) 1024Srgrimestrap.o cons.o: Makefile 1034Srgrimes 104649Snateassym.s: genassym 105648Snate ./genassym >assym.s 1064Srgrimes 107648Snategenassym: 1084Srgrimes ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \ 109648Snate ${I386}/i386/genassym.c -o genassym 1104Srgrimes 1114Srgrimesdepend: assym.s param.c 112509Srgrimes sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c 1134Srgrimes sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c 1144Srgrimes 1154Srgrimeslinks: 1164Srgrimes egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1174Srgrimes sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1184Srgrimes echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1194Srgrimes sort -u | comm -23 - dontlink | \ 1204Srgrimes sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 1214Srgrimes sh makelinks && rm -f dontlink 1224Srgrimes 1234Srgrimestags: 1244Srgrimes @echo "see $S/kern/Makefile for tags" 1254Srgrimes 1264Srgrimesioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \ 1274Srgrimes ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h 1284Srgrimes ${CC} -c ${CFLAGS} ioconf.c 1294Srgrimes 130509Srgrimesconf.o: ${I386}/i386/conf.c 1314Srgrimes ${CC} -traditional -c ${CFLAGS} ${I386}/i386/conf.c 1324Srgrimes 133509Srgrimesparam.c: $S/conf/param.c 1344Srgrimes -rm -f param.c 1354Srgrimes cp $S/conf/param.c . 1364Srgrimes 1374Srgrimesparam.o: param.c Makefile 1384Srgrimes ${CC} -c ${CFLAGS} ${PARAM} param.c 1394Srgrimes 140509Srgrimesvers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 1414Srgrimes sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 1424Srgrimes ${CC} ${CFLAGS} -c vers.c 1434Srgrimes 1444Srgrimes%RULES 1454Srgrimes 1464Srgrimes# DO NOT DELETE THIS LINE -- make depend uses it 1474Srgrimes 148