Makefile.powerpc revision 648
14Srgrimes# Copyright 1990 W. Jolitz 2509Srgrimes# from: @(#)Makefile.i386 7.1 5/10/91 3648Snate# $Id: Makefile.i386,v 1.8 1993/10/14 17:09:54 rgrimes 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 334SrgrimesINCLUDES= -I. -I$S -I$S/sys 344SrgrimesCOPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX 354SrgrimesASFLAGS= 36241SnateCFLAGS= -O ${DEBUG} ${COPTS} 37509SrgrimesLOAD_ADDRESS?= FE000000 384Srgrimes 394SrgrimesNORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 404SrgrimesNORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 414SrgrimesNORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o 424SrgrimesDRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< 434SrgrimesDRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 44603SrgrimesSYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o machdep.o 454SrgrimesSYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} 464SrgrimesSYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 47509SrgrimesSYSTEM_LD= @${LD} -z -T ${LOAD_ADDRESS} -o $@ -X vers.o ${SYSTEM_OBJS} 484SrgrimesSYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \ 49509Srgrimes ${DBSYM} -fT ${LOAD_ADDRESS} $@; ${STRIP} -x $@; size $@; chmod 755 $@ 504Srgrimes 51509Srgrimes# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and 52509Srgrimes# the script is identical for either... -- cgd 53509Srgrimes# 544SrgrimesGPROF.EX= /usr/src/lib/csu.i386/gprof.ex 554SrgrimesPROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \ 56509Srgrimes ed - $*.s < ${GPROF.EX} ; \ 574Srgrimes ${AS} -o $@ $*.s ; \ 584Srgrimes rm -f $*.s 594Srgrimes 604Srgrimes%OBJS 614Srgrimes 624Srgrimes%CFILES 634Srgrimes 644Srgrimes%LOAD 654Srgrimes 664Srgrimesclean: 674Srgrimes rm -f eddep *386bsd tags *.o locore.i [a-uw-z]*.s \ 68648Snate errs linterrs makelinks genassym 694Srgrimes 704Srgrimeslint: /tmp param.c 714Srgrimes @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \ 724Srgrimes ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \ 734Srgrimes grep -v 'struct/union .* never defined' | \ 744Srgrimes grep -v 'possible pointer alignment problem' 754Srgrimes 764Srgrimessymbols.sort: ${I386}/i386/symbols.raw 774Srgrimes grep -v '^#' ${I386}/i386/symbols.raw \ 784Srgrimes | sed 's/^ //' | sort -u > symbols.sort 794Srgrimes 804Srgrimeslocore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \ 814Srgrimes machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \ 824Srgrimes $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \ 834Srgrimes ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h 844Srgrimes ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \ 854Srgrimes ${AS} ${ASFLAGS} -o locore.o 864Srgrimes 87509Srgrimesmachdep.o: ${I386}/i386/machdep.c Makefile 88509Srgrimes ${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $< 89509Srgrimes 904Srgrimes# the following is necessary because autoconf.o depends on #if GENERIC 914Srgrimesautoconf.o: Makefile 924Srgrimes 934Srgrimes# depend on network configuration 944Srgrimesaf.o uipc_proto.o locore.o: Makefile 954Srgrimes 964Srgrimes# depend on maxusers 97544Srgrimesassym.s: Makefile 984Srgrimes 994Srgrimes# depends on KDB (cons.o also depends on GENERIC) 1004Srgrimestrap.o cons.o: Makefile 1014Srgrimes 102648Snateassym.s: genassym $S/sys/param.h machine/pte.h \ 103648Snate $S/sys/buf.h $S/sys/vmmeter.h \ 104648Snate $S/sys/proc.h $S/sys/msgbuf.h machine/vmparam.h 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