Makefile.mvme68k revision 1.9
11.8Smycroft# $NetBSD: Makefile.mvme68k,v 1.9 1996/02/26 02:53:42 mycroft Exp $ 21.1Schuck 31.1Schuck# Makefile for NetBSD 41.1Schuck# 51.1Schuck# This makefile is constructed from a machine description: 61.1Schuck# config machineid 71.1Schuck# Most changes should be made in the machine description 81.1Schuck# /sys/arch/mvme68k/conf/``machineid'' 91.1Schuck# after which you should do 101.6Smycroft# config machineid 111.1Schuck# Machine generic makefile changes should be made in 121.1Schuck# /sys/arch/mvme68k/conf/Makefile.mvme68k 131.1Schuck# after which config should be rerun for all machines of that type. 141.1Schuck# 151.1Schuck# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE 161.1Schuck# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 171.1Schuck# 181.1Schuck# -DTRACE compile in kernel tracing hooks 191.1Schuck# -DQUOTA compile in file system quotas 201.1Schuck 211.6Smycroft# DEBUG is set to -g if debugging. 221.6Smycroft# PROF is set to -pg if profiling. 231.1Schuck 241.9SmycroftAS?= as 251.9SmycroftAWK?= awk 261.9SmycroftCC?= cc 271.9SmycroftCPP?= cpp 281.9SmycroftLD?= ld 291.9SmycroftSTRIP?= strip -d 301.9SmycroftTOUCH?= touch -f -c 311.1Schuck 321.1Schuck# source tree is located via $S relative to the compilation directory 331.1SchuckS= ../../../.. 341.6SmycroftMVME68K=../.. 351.1Schuck 361.6SmycroftINCLUDES= -I. -I$S/arch -I$S 371.6SmycroftCPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dmc68020 -Dmvme68k -DFPCOPROC 381.6SmycroftCFLAGS= ${DEBUG} -O2 -Werror -msoft-float 391.8SmycroftAFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE 401.6SmycroftLINKFLAGS= -n -Ttext 8000 -e start 411.1Schuck 421.1Schuck### find out what to use for libkern 431.1Schuck.include "$S/lib/libkern/Makefile.inc" 441.1Schuck.ifndef PROF 451.1SchuckLIBKERN= ${KERNLIB} 461.1Schuck.else 471.1SchuckLIBKERN= ${KERNLIB_PROF} 481.1Schuck.endif 491.1Schuck 501.1Schuck### find out what to use for libcompat 511.1Schuck.include "$S/compat/common/Makefile.inc" 521.1Schuck.ifndef PROF 531.1SchuckLIBCOMPAT= ${COMPATLIB} 541.1Schuck.else 551.1SchuckLIBCOMPAT= ${COMPATLIB_PROF} 561.1Schuck.endif 571.1Schuck 581.1Schuck### for the Motorola 68040 Floating Point Software Product 591.1Schuck.include "$S/arch/m68k/fpsp/Makefile.inc" 601.1Schuck 611.1Schuck# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} 621.1Schuck# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, 631.1Schuck# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file 641.1Schuck# is marked as config-dependent. 651.1Schuck 661.6SmycroftNORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< 671.6SmycroftNORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< 681.1Schuck 691.6SmycroftDRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< 701.6SmycroftDRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< 711.1Schuck 721.8SmycroftNORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< 731.8SmycroftNORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $< 741.1Schuck 751.1Schuck%OBJS 761.1Schuck 771.1Schuck%CFILES 781.1Schuck 791.6Smycroft%SFILES 801.6Smycroft 811.1Schuck# load lines for config "xxx" will be emitted as: 821.1Schuck# xxx: ${SYSTEM_DEP} swapxxx.o 831.1Schuck# ${SYSTEM_LD_HEAD} 841.1Schuck# ${SYSTEM_LD} swapxxx.o 851.1Schuck# ${SYSTEM_LD_TAIL} 861.6SmycroftSYSTEM_OBJ= locore.o ${FPSP} \ 871.6Smycroft vnode_if.o param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT} 881.6SmycroftSYSTEM_DEP= Makefile ${SYSTEM_OBJ} 891.6SmycroftSYSTEM_LD_HEAD= @rm -f $@ 901.6SmycroftSYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \ 911.6Smycroft ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o 921.6SmycroftSYSTEM_LD_TAIL= @size $@; chmod 755 $@ 931.6Smycroft 941.1SchuckDEBUG?= 951.1Schuck.if ${DEBUG} == "-g" 961.6SmycroftLINKFLAGS+= -X 971.6SmycroftSYSTEM_LD_TAIL+=; \ 981.6Smycroft echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \ 991.6Smycroft echo ${STRIP} $@; ${STRIP} $@ 1001.1Schuck.else 1011.6SmycroftLINKFLAGS+= -x 1021.1Schuck.endif 1031.1Schuck 1041.1Schuck%LOAD 1051.1Schuck 1061.6Smycroftassym.h: genassym 1071.6Smycroft ./genassym >assym.h 1081.6Smycroft 1091.6Smycroftgenassym: genassym.o 1101.6Smycroft ${CC} -o $@ genassym.o 1111.6Smycroft 1121.6Smycroftgenassym.o: ${MVME68K}/mvme68k/genassym.c 1131.6Smycroft ${NORMAL_C_C} 1141.6Smycroft 1151.6Smycroftvnode_if.c vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src 1161.6Smycroft AWK="${AWK}" sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 1171.6Smycroft 1181.6Smycroftparam.c: $S/conf/param.c 1191.6Smycroft rm -f param.c 1201.6Smycroft cp $S/conf/param.c . 1211.6Smycroft 1221.6Smycroftparam.o: param.c Makefile 1231.6Smycroft ${NORMAL_C_C} 1241.6Smycroft 1251.6Smycroftioconf.o: ioconf.c 1261.6Smycroft ${NORMAL_C} 1271.1Schuck 1281.6Smycroftnewvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 1291.1Schuck sh $S/conf/newvers.sh 1301.6Smycroft ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c 1311.6Smycroft 1321.1Schuck 1331.1Schuckclean:: 1341.6Smycroft rm -f eddep *netbsd netbsd.gdb tags vnode_if.[ch] *.[io] [a-z]*.s \ 1351.6Smycroft [Ee]rrs linterrs makelinks genassym genassym.o assym.h 1361.1Schuck 1371.6Smycroftlint: 1381.6Smycroft @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \ 1391.1Schuck ${MVME68K}/mvme68k/Locore.c ${CFILES} ${MVME68K}/mvme68k/swapgeneric.c \ 1401.1Schuck ioconf.c param.c | \ 1411.6Smycroft grep -v 'static function .* unused' 1421.1Schuck 1431.6Smycrofttags: 1441.6Smycroft @echo "see $S/kern/Makefile for tags" 1451.1Schuck 1461.1Schucklinks: 1471.1Schuck egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 1481.1Schuck sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 1491.1Schuck echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 1501.1Schuck sort -u | comm -23 - dontlink | \ 1511.6Smycroft sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks 1521.1Schuck sh makelinks && rm -f dontlink 1531.1Schuck 1541.6SmycroftSRCS= ${MVME68K}/mvme68k/locore.s \ 1551.6Smycroft vnode_if.c param.c ioconf.c ${CFILES} ${SFILES} 1561.6Smycroftdepend: .depend 1571.6Smycroft.depend: ${SRCS} assym.h vnode_if.h param.c 1581.8Smycroft mkdep ${AFLAGS} ${CPPFLAGS} ${MVME68K}/mvme68k/locore.s 1591.6Smycroft mkdep -a ${CFLAGS} ${CPPFLAGS} vnode_if.c param.c ioconf.c ${CFILES} 1601.8Smycroft mkdep -a ${AFLAGS} ${CPPFLAGS} ${SFILES} 1611.6Smycroft mkdep -a ${CFLAGS} ${CPPFLAGS} ${PARAM} ${MVME68K}/mvme68k/genassym.c 1621.6Smycroft 1631.6Smycroft 1641.6Smycroft# depend on root or device configuration 1651.6Smycroftautoconf.o conf.o: Makefile 1661.6Smycroft 1671.6Smycroft# depend on network or filesystem configuration 1681.6Smycroftuipc_proto.o vfs_conf.o: Makefile 1691.1Schuck 1701.6Smycroft# depend on maxusers 1711.6Smycroftgenassym.o machdep.o: Makefile 1721.1Schuck 1731.6Smycroft# depend on CPU configuration 1741.6Smycroftlocore.o pmap.o sys_machdep.o trap.o: Makefile 1751.1Schuck 1761.1Schuck 1771.6Smycroftlocore.o: ${MVME68K}/mvme68k/locore.s assym.h 1781.6Smycroft ${NORMAL_S} 1791.1Schuck 1801.1Schuck%RULES 181