Makefile.vax revision 1.18
11.18Smycroft# $NetBSD: Makefile.vax,v 1.18 1996/02/09 02:21:38 mycroft Exp $ 21.4Scgd 31.16Smycroft# Makefile for NetBSD 41.1Sragge# 51.1Sragge# This makefile is constructed from a machine description: 61.1Sragge# config machineid 71.1Sragge# Most changes should be made in the machine description 81.16Smycroft# /sys/arch/vax/conf/``machineid'' 91.1Sragge# after which you should do 101.16Smycroft# config machineid 111.1Sragge# Machine generic makefile changes should be made in 121.16Smycroft# /sys/arch/vax/conf/Makefile.vax 131.1Sragge# after which config should be rerun for all machines of that type. 141.1Sragge# 151.1Sragge# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE 161.1Sragge# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 171.1Sragge# 181.1Sragge# -DTRACE compile in kernel tracing hooks 191.1Sragge# -DQUOTA compile in file system quotas 201.1Sragge# -DUUDMA compile in unibus tu58 pseudo-dma code 211.16Smycroft 221.16Smycroft# DEBUG is set to -g if debugging. 231.16Smycroft# PROF is set to -pg if profiling. 241.16Smycroft 251.16SmycroftAS= as 261.16SmycroftAWK= awk 271.1SraggeCC= cc 281.1SraggeCPP= cpp 291.16SmycroftLD= ld 301.16SmycroftSTRIP= strip -d 311.16SmycroftTOUCH= touch -f -c 321.1Sragge 331.16Smycroft# source tree is located via $S relative to the compilation directory 341.1SraggeS= ../../../.. 351.1SraggeVAX= ../.. 361.1Sragge 371.16SmycroftINCLUDES= -I. -I$S/arch -I$S 381.16SmycroftCPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D_VAX_INLINE_ 391.16SmycroftCFLAGS= ${DEBUG} -O2 -Werror 401.18SmycroftAFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE 411.16SmycroftLINKFLAGS= -Z -Ttext 80000000 -e _start 421.1Sragge 431.1Sragge### find out what to use for libkern 441.1Sragge.include "$S/lib/libkern/Makefile.inc" 451.1Sragge.ifndef PROF 461.9SchristosLIBKERN= ${KERNLIB} 471.1Sragge.else 481.1SraggeLIBKERN= ${KERNLIB_PROF} 491.1Sragge.endif 501.1Sragge 511.11Sragge### find out what to use for libcompat 521.11Sragge.include "$S/compat/common/Makefile.inc" 531.11Sragge.ifndef PROF 541.11SraggeLIBCOMPAT= ${COMPATLIB} 551.11Sragge.else 561.11SraggeLIBCOMPAT= ${COMPATLIB_PROF} 571.11Sragge.endif 581.11Sragge 591.16Smycroft# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} 601.16Smycroft# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, 611.16Smycroft# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file 621.16Smycroft# is marked as config-dependent. 631.16Smycroft 641.16SmycroftNORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< 651.16SmycroftNORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< 661.16Smycroft 671.16SmycroftDRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< 681.16SmycroftDRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< 691.1Sragge 701.18SmycroftNORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< 711.18SmycroftNORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $< 721.1Sragge 731.1Sragge%OBJS 741.1Sragge 751.1Sragge%CFILES 761.1Sragge 771.16Smycroft%SFILES 781.16Smycroft 791.16Smycroft# load lines for config "xxx" will be emitted as: 801.16Smycroft# xxx: ${SYSTEM_DEP} swapxxx.o 811.16Smycroft# ${SYSTEM_LD_HEAD} 821.16Smycroft# ${SYSTEM_LD} swapxxx.o 831.16Smycroft# ${SYSTEM_LD_TAIL} 841.16SmycroftSYSTEM_OBJ= intvec.o subr.o lim.o \ 851.16Smycroft vnode_if.o param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT} 861.16SmycroftSYSTEM_DEP= Makefile ${SYSTEM_OBJ} 871.16SmycroftSYSTEM_LD_HEAD= @rm -f $@ 881.16SmycroftSYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \ 891.16Smycroft ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o 901.16SmycroftSYSTEM_LD_TAIL= @size $@; chmod 755 $@ 911.16Smycroft 921.16SmycroftDEBUG?= 931.16Smycroft.if ${DEBUG} == "-g" 941.16SmycroftLINKFLAGS+= -X 951.16SmycroftSYSTEM_LD_TAIL+=; \ 961.16Smycroft echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \ 971.16Smycroft echo ${STRIP} $@; ${STRIP} $@ 981.16Smycroft.else 991.16SmycroftLINKFLAGS+= -x 1001.16Smycroft.endif 1011.16Smycroft 1021.1Sragge%LOAD 1031.1Sragge 1041.16Smycroftvnode_if.c vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src 1051.16Smycroft AWK="${AWK}" sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 1061.1Sragge 1071.16Smycroftparam.c: $S/conf/param.c 1081.16Smycroft rm -f param.c 1091.16Smycroft cp $S/conf/param.c . 1101.1Sragge 1111.16Smycroftparam.o: param.c Makefile 1121.16Smycroft ${NORMAL_C_C} 1131.1Sragge 1141.16Smycroftioconf.o: ioconf.c 1151.16Smycroft ${NORMAL_C} 1161.1Sragge 1171.16Smycroftnewvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 1181.16Smycroft sh $S/conf/newvers.sh 1191.16Smycroft ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c 1201.1Sragge 1211.1Sragge 1221.16Smycroftclean:: 1231.16Smycroft rm -f eddep *netbsd netbsd.gdb tags vnode_if.[ch] *.[io] [a-z]*.s \ 1241.16Smycroft [Ee]rrs linterrs makelinks 1251.1Sragge 1261.16Smycroftlint: 1271.16Smycroft @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \ 1281.16Smycroft ${VAX}/vax/Locore.c ${CFILES} ${VAX}/vax/swapgeneric.c \ 1291.16Smycroft ioconf.c param.c | \ 1301.16Smycroft grep -v 'static function .* unused' 1311.16Smycroft 1321.16Smycrofttags: 1331.16Smycroft @echo "see $S/kern/Makefile for tags" 1341.16Smycroft 1351.16Smycroftlinks: 1361.16Smycroft egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1371.16Smycroft sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1381.16Smycroft echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1391.16Smycroft sort -u | comm -23 - dontlink | \ 1401.16Smycroft sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks 1411.16Smycroft sh makelinks && rm -f dontlink 1421.16Smycroft 1431.16SmycroftSRCS= ${VAX}/vax/intvec.s ${VAX}/vax/subr.s lim.c \ 1441.16Smycroft vnode_if.c param.c ioconf.c ${CFILES} ${SFILES} 1451.16Smycroftdepend: .depend 1461.16Smycroft.depend: ${SRCS} vnode_if.h param.c 1471.18Smycroft mkdep ${AFLAGS} ${CPPFLAGS} ${VAX}/vax/intvec.s ${VAX}/vax/subr.s 1481.16Smycroft mkdep -a ${CFLAGS} ${CPPFLAGS} lim.c 1491.16Smycroft mkdep -a ${CFLAGS} ${CPPFLAGS} vnode_if.c param.c ioconf.c ${CFILES} 1501.18Smycroft mkdep -a ${AFLAGS} ${CPPFLAGS} ${SFILES} 1511.16Smycroft 1521.16Smycroft 1531.16Smycroft# depend on root or device configuration 1541.16Smycroftautoconf.o conf.o: Makefile 1551.16Smycroft 1561.16Smycroft# depend on network or filesystem configuration 1571.16Smycroftuipc_proto.o vfs_conf.o: Makefile 1581.16Smycroft 1591.16Smycroft# depend on maxusers 1601.16Smycroftmachdep.o: Makefile 1611.16Smycroft 1621.16Smycroft# depend on CPU configuration 1631.16Smycrofttmscp.o ts.o uba.o uda.o autoconf.o clock.o conf.o emulate.o intvec.o: Makefile 1641.16Smycroftmachdep.o sbi.o subr.o uvaxII.o: Makefile 1651.5Sragge 1661.1Sragge 1671.16Smycroftintvec.o: ${VAX}/vax/intvec.s 1681.16Smycroft ${NORMAL_S} 1691.1Sragge 1701.16Smycroftsubr.o: ${VAX}/vax/subr.s 1711.16Smycroft ${NORMAL_S} 1721.3Sragge 1731.16Smycroftlim.c: ioconf.c 1741.16Smycroft ../../conf/mkoldconf.awk < ioconf.c > lim.c 1751.3Sragge 1761.16Smycroftlim.o: lim.c 1771.16Smycroft ${NORMAL_C_C} 1781.1Sragge 1791.1Sragge%RULES 180