Makefile.alpha revision 1.21
11.21Smycroft# $NetBSD: Makefile.alpha,v 1.21 1996/08/12 00:51:24 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.13SmycroftCC?= cc 251.13SmycroftLD?= ld 261.19SmycroftMKDEP?= mkdep 271.13SmycroftSTRIP?= strip -g -X -x 281.13SmycroftTOUCH?= touch -f -c 291.1Scgd 301.1Scgd# source tree is located via $S relative to the compilation directory 311.19SmycroftS!= cd ../../../..; pwd 321.19SmycroftALPHA= $S/arch/alpha 331.1Scgd 341.20SmycroftINCLUDES= -I. -I$S/arch -I$S -nostdinc 351.21SmycroftCPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \ 361.21Smycroft -Dalpha 371.19SmycroftCWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes 381.19SmycroftCFLAGS= ${DEBUG} ${CWARNFLAGS} -O2 -mno-fp-regs 391.12SmycroftAFLAGS= -x assembler-with-cpp -traditional-cpp -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.21Smycroft# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or 591.21Smycroft# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file). 601.1Scgd 611.10SmycroftNORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< 621.12SmycroftNORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< 631.1Scgd 641.21SmycroftHOSTED_C= ${NORMAL_C:S/^-pg$//:S/^-p$//:S/^-nostdinc$//} 651.20Smycroft 661.1Scgd%OBJS 671.1Scgd 681.1Scgd%CFILES 691.1Scgd 701.10Smycroft%SFILES 711.10Smycroft 721.1Scgd# load lines for config "xxx" will be emitted as: 731.1Scgd# xxx: ${SYSTEM_DEP} swapxxx.o 741.1Scgd# ${SYSTEM_LD_HEAD} 751.1Scgd# ${SYSTEM_LD} swapxxx.o 761.1Scgd# ${SYSTEM_LD_TAIL} 771.10SmycroftSYSTEM_OBJ= locore.o \ 781.14Scgd param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT} 791.1ScgdSYSTEM_DEP= Makefile ${SYSTEM_OBJ} 801.10SmycroftSYSTEM_LD_HEAD= @rm -f $@ 811.10SmycroftSYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \ 821.10Smycroft ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o 831.1ScgdSYSTEM_LD_TAIL= @size $@; chmod 755 $@ 841.10Smycroft 851.10SmycroftDEBUG?= 861.8Scgd.if ${DEBUG} == "-g" 871.10SmycroftLINKFLAGS+= -X 881.10SmycroftSYSTEM_LD_TAIL+=; \ 891.10Smycroft echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \ 901.10Smycroft echo ${STRIP} $@; ${STRIP} $@ 911.8Scgd.else 921.19SmycroftLINKFLAGS+= -S 931.8Scgd.endif 941.1Scgd 951.1Scgd%LOAD 961.1Scgd 971.10Smycroftassym.h: genassym 981.10Smycroft ./genassym >assym.h 991.10Smycroft 1001.10Smycroftgenassym: genassym.o 1011.10Smycroft ${CC} -o $@ genassym.o 1021.10Smycroft 1031.10Smycroftgenassym.o: ${ALPHA}/alpha/genassym.c 1041.21Smycroft ${HOSTED_C} 1051.10Smycroft 1061.10Smycroftparam.c: $S/conf/param.c 1071.10Smycroft rm -f param.c 1081.10Smycroft cp $S/conf/param.c . 1091.1Scgd 1101.10Smycroftparam.o: param.c Makefile 1111.21Smycroft ${NORMAL_C} 1121.1Scgd 1131.10Smycroftioconf.o: ioconf.c 1141.10Smycroft ${NORMAL_C} 1151.1Scgd 1161.10Smycroftnewvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 1171.10Smycroft sh $S/conf/newvers.sh 1181.10Smycroft ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c 1191.1Scgd 1201.1Scgd 1211.10Smycroftclean:: 1221.14Scgd rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \ 1231.10Smycroft [Ee]rrs linterrs makelinks genassym genassym.o assym.h 1241.1Scgd 1251.10Smycroftlint: 1261.21Smycroft @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \ 1271.10Smycroft ${ALPHA}/alpha/Locore.c ${CFILES} ${ALPHA}/alpha/swapgeneric.c \ 1281.10Smycroft ioconf.c param.c | \ 1291.10Smycroft grep -v 'static function .* unused' 1301.1Scgd 1311.10Smycrofttags: 1321.10Smycroft @echo "see $S/kern/Makefile for tags" 1331.1Scgd 1341.1Scgdlinks: 1351.1Scgd egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1361.1Scgd sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1371.1Scgd echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1381.1Scgd sort -u | comm -23 - dontlink | \ 1391.10Smycroft sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks 1401.1Scgd sh makelinks && rm -f dontlink 1411.1Scgd 1421.10SmycroftSRCS= ${ALPHA}/alpha/locore.s \ 1431.14Scgd param.c ioconf.c ${CFILES} ${SFILES} 1441.15Smycroftdepend:: .depend 1451.14Scgd.depend: ${SRCS} assym.h param.c 1461.19Smycroft ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/locore.s 1471.19Smycroft ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES} 1481.19Smycroft ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES} 1491.21Smycroft ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/genassym.c 1501.10Smycroft 1511.1Scgd 1521.10Smycroft# depend on root or device configuration 1531.10Smycroftautoconf.o conf.o: Makefile 1541.10Smycroft 1551.10Smycroft# depend on network or filesystem configuration 1561.10Smycroftuipc_proto.o vfs_conf.o: Makefile 1571.10Smycroft 1581.10Smycroft# depend on maxusers 1591.10Smycroftgenassym.o machdep.o: Makefile 1601.1Scgd 1611.10Smycroft# depend on CPU configuration 1621.10Smycroftclock.o machdep.o apecs.o cia.o lca.o ioasic.o scc.o icasic.o: Makefile 1631.1Scgd 1641.1Scgd 1651.10Smycroftlocore.o: ${ALPHA}/alpha/locore.s assym.h 1661.10Smycroft ${NORMAL_S} 1671.1Scgd 1681.1Scgd%RULES 1691.18Scgd 1701.18Scgd### add microcode dependencies 1711.18Scgd.include "$S/dev/microcode/Makefile.inc" 172