Makefile.i386 revision 1.12
11.1Scgd# Copyright 1990 W. Jolitz 21.9Scgd# from @(#)Makefile.i386 7.1 5/10/91 31.12Scgd# $Id: Makefile.i386,v 1.12 1993/05/24 11:04:52 cgd 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.1ScgdCC= cc 261.1ScgdCPP= cpp 271.1Scgd 281.11ScgdS= ../../../.. 291.11ScgdI386= ../.. 301.1Scgd 311.11ScgdINCLUDES= -I. -I$S/arch -I$S -I$S/sys 321.1ScgdCOPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX 331.1ScgdASFLAGS= 341.1ScgdCFLAGS= -O ${COPTS} 351.1Scgd 361.1ScgdNORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 371.1ScgdNORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 381.3ScgdNORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o 391.1ScgdDRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< 401.1ScgdDRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 411.1ScgdSYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o 421.1ScgdSYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} 431.1ScgdSYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 441.2ScgdSYSTEM_LD= @${LD} -z -T FE000000 -o $@ -X vers.o ${SYSTEM_OBJS} 451.5ScgdSYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; /usr/sbin/dbsym $@ || true; size $@; chmod 755 $@ 461.1Scgd 471.8Scgd# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and 481.8Scgd# the script is identical for either... -- cgd 491.8Scgd# 501.2ScgdGPROF.EX= /usr/src/lib/csu.i386/gprof.ex 511.2ScgdPROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \ 521.8Scgd ed - $*.s < ${GPROF.EX} ; \ 531.2Scgd ${AS} -o $@ $*.s ; \ 541.2Scgd rm -f $*.s 551.2Scgd 561.1Scgd%OBJS 571.1Scgd 581.1Scgd%CFILES 591.1Scgd 601.1Scgd%LOAD 611.1Scgd 621.1Scgdclean: 631.7Scgd rm -f eddep *netbsd tags *.o locore.i [a-uw-z]*.s \ 641.1Scgd errs linterrs makelinks 651.1Scgd 661.1Scgdlint: /tmp param.c 671.1Scgd @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \ 681.1Scgd ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \ 691.1Scgd grep -v 'struct/union .* never defined' | \ 701.1Scgd grep -v 'possible pointer alignment problem' 711.1Scgd 721.1Scgdsymbols.sort: ${I386}/i386/symbols.raw 731.1Scgd grep -v '^#' ${I386}/i386/symbols.raw \ 741.1Scgd | sed 's/^ //' | sort -u > symbols.sort 751.1Scgd 761.1Scgdlocore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \ 771.1Scgd machine/pte.h vector.s ${I386}/isa/icu.s ${I386}/isa/isa.h \ 781.1Scgd ${I386}/isa/icu.h 791.1Scgd ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \ 801.1Scgd ${AS} ${ASFLAGS} -o locore.o 811.1Scgd 821.1Scgd# the following is necessary because autoconf.o depends on #if GENERIC 831.1Scgdautoconf.o: Makefile 841.1Scgd 851.1Scgd# depend on network configuration 861.1Scgdaf.o uipc_proto.o locore.o: Makefile 871.1Scgd 881.1Scgd# depend on maxusers 891.1Scgdassym.s machdep.o: Makefile 901.1Scgd 911.1Scgd# depends on KDB (cons.o also depends on GENERIC) 921.1Scgdtrap.o cons.o: Makefile 931.1Scgd 941.1Scgdassym.s: $S/sys/param.h machine/pte.h $S/sys/buf.h \ 951.1Scgd $S/sys/vmmeter.h \ 961.1Scgd $S/sys/proc.h $S/sys/msgbuf.h machine/vmparam.h 971.1Scgd 981.1Scgdassym.s: genassym 991.1Scgd ./genassym >assym.s 1001.1Scgd 1011.1Scgdgenassym: 1021.1Scgd ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \ 1031.1Scgd ${I386}/i386/genassym.c -o genassym 1041.1Scgd 1051.1Scgddepend: assym.s param.c 1061.12Scgd sh /usr/bin/mkdep ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c 1071.1Scgd sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c 1081.1Scgd 1091.1Scgdlinks: 1101.1Scgd egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1111.1Scgd sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1121.1Scgd echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1131.1Scgd sort -u | comm -23 - dontlink | \ 1141.1Scgd sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 1151.1Scgd sh makelinks && rm -f dontlink 1161.1Scgd 1171.1Scgdtags: 1181.1Scgd @echo "see $S/kern/Makefile for tags" 1191.1Scgd 1201.1Scgdioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \ 1211.1Scgd ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h 1221.1Scgd ${CC} -c ${CFLAGS} ioconf.c 1231.1Scgd 1241.12Scgdconf.o: 1251.1Scgd ${CC} -traditional -c ${CFLAGS} ${I386}/i386/conf.c 1261.1Scgd 1271.1Scgdparam.c: $S/conf/param.c 1281.1Scgd -rm -f param.c 1291.1Scgd cp $S/conf/param.c . 1301.1Scgd 1311.1Scgdparam.o: param.c Makefile 1321.1Scgd ${CC} -c ${CFLAGS} ${PARAM} param.c 1331.2Scgd 1341.12Scgdvers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 1351.2Scgd sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 1361.2Scgd cc ${CFLAGS} -c vers.c 1371.1Scgd 1381.1Scgd%RULES 1391.1Scgd 1401.1Scgd# DO NOT DELETE THIS LINE -- make depend uses it 1411.1Scgd 142