Makefile.alpha revision 1.10
11.10Smycroft# $NetBSD: Makefile.alpha,v 1.10 1996/02/02 20:08:17 mycroft Exp $ 21.10Smycroft 31.1Scgd# Makefile for NetBSD 41.1Scgd# 51.1Scgd# This makefile is constructed from a machine description: 61.1Scgd# config machineid 71.1Scgd# Most changes should be made in the machine description 81.10Smycroft# /sys/arch/alpha/conf/``machineid'' 91.1Scgd# after which you should do 101.10Smycroft# config machineid 111.1Scgd# Machine generic makefile changes should be made in 121.10Smycroft# /sys/arch/alpha/conf/Makefile.alpha 131.1Scgd# after which config should be rerun for all machines of that type. 141.1Scgd# 151.1Scgd# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE 161.1Scgd# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 171.1Scgd# 181.1Scgd# -DTRACE compile in kernel tracing hooks 191.1Scgd# -DQUOTA compile in file system quotas 201.1Scgd 211.1Scgd# DEBUG is set to -g if debugging. 221.1Scgd# PROF is set to -pg if profiling. 231.1Scgd 241.10SmycroftAS= as 251.10SmycroftAWK= awk 261.10SmycroftCC= cc 271.10SmycroftCPP= cpp 281.10SmycroftLD= ld 291.10SmycroftSTRIP= strip -g -X -x 301.10SmycroftTOUCH= touch -f -c 311.1Scgd 321.1Scgd# source tree is located via $S relative to the compilation directory 331.1ScgdS= ../../../.. 341.1ScgdALPHA= ../.. 351.1Scgd 361.10SmycroftINCLUDES= -I. -I$S/arch -I$S 371.10SmycroftCPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dalpha 381.10SmycroftCFLAGS= ${DEBUG} -Werror -mno-fp-regs 391.10SmycroftAFLAGS= -D_LOCORE 401.10SmycroftLINKFLAGS= -N -Ttext fffffc0000230000 -e __start -G 4 411.1Scgd 421.1Scgd### find out what to use for libkern 431.1Scgd.include "$S/lib/libkern/Makefile.inc" 441.1Scgd.ifndef PROF 451.1ScgdLIBKERN= ${KERNLIB} 461.1Scgd.else 471.1ScgdLIBKERN= ${KERNLIB_PROF} 481.1Scgd.endif 491.1Scgd 501.5Schristos### find out what to use for libcompat 511.5Schristos.include "$S/compat/common/Makefile.inc" 521.5Schristos.ifndef PROF 531.5SchristosLIBCOMPAT= ${COMPATLIB} 541.5Schristos.else 551.5SchristosLIBCOMPAT= ${COMPATLIB_PROF} 561.5Schristos.endif 571.5Schristos 581.1Scgd# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} 591.1Scgd# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, 601.1Scgd# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file 611.1Scgd# is marked as config-dependent. 621.1Scgd 631.10SmycroftNORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< 641.10SmycroftNORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< 651.10Smycroft 661.10SmycroftDRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< 671.10SmycroftDRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< 681.10Smycroft 691.10SmycroftNORMAL_S= ${CC} -x assembler-with-cpp ${AFLAGS} ${CPPFLAGS} -c $< 701.10SmycroftNORMAL_S_C= ${CC} -x assembler-with-cpp ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $< 711.1Scgd 721.1Scgd%OBJS 731.1Scgd 741.1Scgd%CFILES 751.1Scgd 761.10Smycroft%SFILES 771.10Smycroft 781.1Scgd# load lines for config "xxx" will be emitted as: 791.1Scgd# xxx: ${SYSTEM_DEP} swapxxx.o 801.1Scgd# ${SYSTEM_LD_HEAD} 811.1Scgd# ${SYSTEM_LD} swapxxx.o 821.1Scgd# ${SYSTEM_LD_TAIL} 831.10SmycroftSYSTEM_OBJ= locore.o \ 841.10Smycroft vnode_if.o param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT} 851.1ScgdSYSTEM_DEP= Makefile ${SYSTEM_OBJ} 861.10SmycroftSYSTEM_LD_HEAD= @rm -f $@ 871.10SmycroftSYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \ 881.10Smycroft ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o 891.1ScgdSYSTEM_LD_TAIL= @size $@; chmod 755 $@ 901.10Smycroft 911.10SmycroftDEBUG?= 921.8Scgd.if ${DEBUG} == "-g" 931.10SmycroftLINKFLAGS+= -X 941.10SmycroftSYSTEM_LD_TAIL+=; \ 951.10Smycroft echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \ 961.10Smycroft echo ${STRIP} $@; ${STRIP} $@ 971.8Scgd.else 981.10SmycroftLINKFLAGS+= -x 991.8Scgd.endif 1001.1Scgd 1011.1Scgd%LOAD 1021.1Scgd 1031.10Smycroftassym.h: genassym 1041.10Smycroft ./genassym >assym.h 1051.10Smycroft 1061.10Smycroftgenassym: genassym.o 1071.10Smycroft ${CC} -o $@ genassym.o 1081.10Smycroft 1091.10Smycroftgenassym.o: ${ALPHA}/alpha/genassym.c 1101.10Smycroft ${NORMAL_C_C} 1111.10Smycroft 1121.10Smycroftvnode_if.c vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src 1131.10Smycroft AWK="${AWK}" sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 1141.1Scgd 1151.10Smycroftparam.c: $S/conf/param.c 1161.10Smycroft rm -f param.c 1171.10Smycroft cp $S/conf/param.c . 1181.1Scgd 1191.10Smycroftparam.o: param.c Makefile 1201.10Smycroft ${NORMAL_C_C} 1211.1Scgd 1221.10Smycroftioconf.o: ioconf.c 1231.10Smycroft ${NORMAL_C} 1241.1Scgd 1251.10Smycroftnewvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 1261.10Smycroft sh $S/conf/newvers.sh 1271.10Smycroft ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c 1281.1Scgd 1291.1Scgd 1301.10Smycroftclean:: 1311.10Smycroft rm -f eddep *netbsd netbsd.gdb tags vnode_if.[ch] *.[io] [a-z]*.s \ 1321.10Smycroft [Ee]rrs linterrs makelinks genassym genassym.o assym.h 1331.1Scgd 1341.10Smycroftlint: 1351.10Smycroft @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \ 1361.10Smycroft ${ALPHA}/alpha/Locore.c ${CFILES} ${ALPHA}/alpha/swapgeneric.c \ 1371.10Smycroft ioconf.c param.c | \ 1381.10Smycroft grep -v 'static function .* unused' 1391.1Scgd 1401.10Smycrofttags: 1411.10Smycroft @echo "see $S/kern/Makefile for tags" 1421.1Scgd 1431.1Scgdlinks: 1441.1Scgd egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1451.1Scgd sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1461.1Scgd echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1471.1Scgd sort -u | comm -23 - dontlink | \ 1481.10Smycroft sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks 1491.1Scgd sh makelinks && rm -f dontlink 1501.1Scgd 1511.10SmycroftSRCS= ${ALPHA}/alpha/locore.s \ 1521.10Smycroft vnode_if.c param.c ioconf.c ${CFILES} ${SFILES} 1531.10Smycroftdepend: .depend 1541.10Smycroft.depend: ${SRCS} assym.h vnode_if.h param.c 1551.10Smycroft mkdep -x assembler-with-cpp ${AFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/locore.s 1561.10Smycroft mkdep -a ${CFLAGS} ${CPPFLAGS} vnode_if.c param.c ioconf.c ${CFILES} 1571.10Smycroft mkdep -a -x assembler-with-cpp ${AFLAGS} ${CPPFLAGS} ${SFILES} 1581.10Smycroft mkdep -a ${CFLAGS} ${CPPFLAGS} ${PARAM} ${ALPHA}/alpha/genassym.c 1591.10Smycroft 1601.1Scgd 1611.10Smycroft# depend on root or device configuration 1621.10Smycroftautoconf.o conf.o: Makefile 1631.10Smycroft 1641.10Smycroft# depend on network or filesystem configuration 1651.10Smycroftuipc_proto.o vfs_conf.o: Makefile 1661.10Smycroft 1671.10Smycroft# depend on maxusers 1681.10Smycroftgenassym.o machdep.o: Makefile 1691.1Scgd 1701.10Smycroft# depend on CPU configuration 1711.10Smycroftclock.o machdep.o apecs.o cia.o lca.o ioasic.o scc.o icasic.o: Makefile 1721.1Scgd 1731.1Scgd 1741.10Smycroftlocore.o: ${ALPHA}/alpha/locore.s assym.h 1751.10Smycroft ${NORMAL_S} 1761.1Scgd 1771.1Scgd%RULES 178