Makefile.i386 revision 1.30
11.1Scgd# Copyright 1990 W. Jolitz 21.26Smycroft# from: @(#)Makefile.i386 7.1 5/10/91 31.30Sbrezak# $Id: Makefile.i386,v 1.30 1993/09/13 15:28:23 brezak Exp $ 41.9Scgd# 51.8Scgd# Makefile for NetBSD 61.1Scgd# 71.1Scgd# This makefile is constructed from a machine description: 81.1Scgd# config machineid 91.1Scgd# Most changes should be made in the machine description 101.1Scgd# /sys/i386/conf/``machineid'' 111.1Scgd# after which you should do 121.1Scgd# config machineid 131.1Scgd# Generic makefile changes should be made in 141.1Scgd# /sys/i386/conf/Makefile.i386 151.1Scgd# after which config should be rerun for all machines. 161.1Scgd# 171.1Scgd# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE INVISIBLE TO MAKEFILE 181.1Scgd# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 191.1Scgd# 201.1Scgd# -DTRACE compile in kernel tracing hooks 211.1Scgd# -DQUOTA compile in file system quotas 221.1Scgd# 231.1ScgdTOUCH= touch -f -c 241.1ScgdLD= /usr/bin/ld 251.23ScgdCC= cc 261.1ScgdCPP= cpp 271.28SbrezakSTRIP= strip 281.28SbrezakDBSYM= /usr/sbin/dbsym 291.1Scgd 301.11ScgdS= ../../../.. 311.11ScgdI386= ../.. 321.1Scgd 331.11ScgdINCLUDES= -I. -I$S/arch -I$S -I$S/sys 341.16SbrezakCOPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 351.1ScgdASFLAGS= 361.25SmycroftCFLAGS= -O ${DEBUG} ${COPTS} 371.30SbrezakLOAD_ADDRESS ?= FE100000 381.1Scgd 391.1ScgdNORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 401.1ScgdNORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 411.3ScgdNORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o 421.1ScgdDRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< 431.1ScgdDRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 441.29SjtcSYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o ../libkern.a 451.1ScgdSYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} 461.1ScgdSYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 471.22SmycroftSYSTEM_LD= @${LD} -z -T ${LOAD_ADDRESS} -o $@ -X vers.o ${SYSTEM_OBJS} 481.28SbrezakSYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; ${DBSYM} -fT ${LOAD_ADDRESS} $@; ${STRIP} -x $@; size $@; chmod 755 $@ 491.1Scgd 501.8Scgd# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and 511.8Scgd# the script is identical for either... -- cgd 521.8Scgd# 531.15ScgdGPROF.EX= /usr/src/lib/csu/i386/gprof.ex 541.2ScgdPROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \ 551.8Scgd ed - $*.s < ${GPROF.EX} ; \ 561.2Scgd ${AS} -o $@ $*.s ; \ 571.2Scgd rm -f $*.s 581.2Scgd 591.1Scgd%OBJS 601.1Scgd 611.1Scgd%CFILES 621.1Scgd 631.1Scgd%LOAD 641.1Scgd 651.1Scgdclean: 661.7Scgd rm -f eddep *netbsd tags *.o locore.i [a-uw-z]*.s \ 671.13Scgd errs linterrs makelinks genassym 681.1Scgd 691.1Scgdlint: /tmp param.c 701.1Scgd @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \ 711.1Scgd ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \ 721.1Scgd grep -v 'struct/union .* never defined' | \ 731.1Scgd grep -v 'possible pointer alignment problem' 741.1Scgd 751.1Scgdsymbols.sort: ${I386}/i386/symbols.raw 761.1Scgd grep -v '^#' ${I386}/i386/symbols.raw \ 771.1Scgd | sed 's/^ //' | sort -u > symbols.sort 781.1Scgd 791.1Scgdlocore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \ 801.13Scgd machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \ 811.13Scgd $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \ 821.13Scgd ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h 831.1Scgd ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \ 841.1Scgd ${AS} ${ASFLAGS} -o locore.o 851.30Sbrezak 861.30Sbrezakmachdep.o: ${I386}/i386/machdep.c Makefile 871.30Sbrezak ${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $< 881.1Scgd 891.1Scgd# the following is necessary because autoconf.o depends on #if GENERIC 901.1Scgdautoconf.o: Makefile 911.1Scgd 921.1Scgd# depend on network configuration 931.1Scgdaf.o uipc_proto.o locore.o: Makefile 941.1Scgd 951.1Scgd# depend on maxusers 961.1Scgdassym.s machdep.o: Makefile 971.1Scgd 981.1Scgd# depends on KDB (cons.o also depends on GENERIC) 991.1Scgdtrap.o cons.o: Makefile 1001.1Scgd 1011.1Scgdassym.s: $S/sys/param.h machine/pte.h $S/sys/buf.h \ 1021.1Scgd $S/sys/vmmeter.h \ 1031.1Scgd $S/sys/proc.h $S/sys/msgbuf.h machine/vmparam.h 1041.1Scgd 1051.1Scgdassym.s: genassym 1061.1Scgd ./genassym >assym.s 1071.1Scgd 1081.1Scgdgenassym: 1091.1Scgd ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \ 1101.1Scgd ${I386}/i386/genassym.c -o genassym 1111.1Scgd 1121.1Scgddepend: assym.s param.c 1131.27Sbrezak sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c 1141.1Scgd sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c 1151.1Scgd 1161.1Scgdlinks: 1171.1Scgd egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1181.1Scgd sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1191.1Scgd echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1201.1Scgd sort -u | comm -23 - dontlink | \ 1211.1Scgd sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 1221.1Scgd sh makelinks && rm -f dontlink 1231.1Scgd 1241.1Scgdtags: 1251.1Scgd @echo "see $S/kern/Makefile for tags" 1261.1Scgd 1271.1Scgdioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \ 1281.1Scgd ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h 1291.1Scgd ${CC} -c ${CFLAGS} ioconf.c 1301.1Scgd 1311.14Scgdconf.o: ${I386}/i386/conf.c 1321.1Scgd ${CC} -traditional -c ${CFLAGS} ${I386}/i386/conf.c 1331.1Scgd 1341.1Scgdparam.c: $S/conf/param.c 1351.1Scgd -rm -f param.c 1361.1Scgd cp $S/conf/param.c . 1371.1Scgd 1381.1Scgdparam.o: param.c Makefile 1391.1Scgd ${CC} -c ${CFLAGS} ${PARAM} param.c 1401.2Scgd 1411.12Scgdvers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 1421.2Scgd sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 1431.13Scgd ${CC} ${CFLAGS} -c vers.c 1441.1Scgd 1451.1Scgd%RULES 1461.1Scgd 1471.1Scgd# DO NOT DELETE THIS LINE -- make depend uses it 1481.1Scgd 149