1# @(#)Makefile.news3400 8.1 (Berkeley) 06/10/93 2 3# Makefile for 4.4 BSD 4# 5# This makefile is constructed from a machine description: 6# config machineid 7# Most changes should be made in the machine description 8# /sys/vax/conf/``machineid'' 9# after which you should do 10# config machineid 11# Machine generic makefile changes should be made in 12# /sys/conf/Makefile.``machinetype'' 13# after which config should be rerun for all machines of that type. 14# 15# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE 16# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING 17# 18# -DTRACE compile in kernel tracing hooks 19# -DQUOTA compile in file system quotas 20# -DUUDMA compile in unibus tu58 pseudo-dma code 21# 22 23CC= gcc -traditional-cpp -fno-builtin -nostdinc 24AS= cc2.11 -I 25LD= /usr/local/gnu/lib/gcc-lib/mips-sony-bsd/2.3.3/ld 26 27S= ../.. 28NEWS3400= $S/news3400 29 30INCLUDES= -I. -I$S 31COPTS= ${INCLUDES} ${IDENT} -Unews3800 -Unews3700 -Dmips -DKERNEL 32CFLAGS= ${COPTS} 33AHEADS= 34 35INLINECMD= ${NEWS3400}/inline/obj/inline 36INLINE= ${INLINECMD} ${INLINEOPTS} 37 38 39# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} 40# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, 41# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file 42# is marked as config-dependent. 43 44NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 45NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 46 47DRIVER_C= ${CC} -c ${COPTS} ${PROF} $< 48DRIVER_C_C= ${CC} -c ${COPTS} ${PROF} ${PARAM} $< 49 50NORMAL_S= ${AS} -c ${COPTS} $< 51NORMAL_S_C= ${AS} -c ${COPTS} ${PARAM} $< 52 53%OBJS 54 55%CFILES 56 57# load lines for config "xxx" will be emitted as: 58# xxx: ${SYSTEM_DEP} swapxxx.o 59# ${SYSTEM_LD_HEAD} 60# ${SYSTEM_LD} swapxxx.o 61# ${SYSTEM_LD_TAIL} 62SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o vnode_if.o 63SYSTEM_DEP= Makefile ${SYSTEM_OBJ} 64SYSTEM_LD_HEAD= rm -f $@ 65SYSTEM_LD= @echo loading vmunix; \ 66 ${LD} -N -o $@ -e start -T 80001000 ${SYSTEM_OBJ} vers.o ../../libkern/obj/libkern.a 67SYSTEM_LD_TAIL= @echo done 68 69%LOAD 70 71newvers vers.c: 72 sh $S/conf/newvers.sh 73 ${CC} $(CFLAGS) -c vers.c 74 75clean: 76 rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s assym.h \ 77 vnode_if.c vnode_if.h \ 78 Errs errs linterrs makelinks 79 80lint: /tmp param.c 81 @lint -hbxn -DGENERIC ${COPTS} ${PARAM} \ 82 ${NEWS3400}/news3400/Locore.c ${CFILES} ioconf.c param.c | \ 83 grep -v 'struct/union .* never defined' | \ 84 grep -v 'possible pointer alignment problem' 85 86${INLINECMD}: 87 cd ${NEWS3400}/inline; make 88 89locore.o: assym.h ${AHEADS} ${NEWS3400}/news3400/locore.s 90locore.o: ../../sys/errno.h 91locore.o: ../../sys/syscall.h 92locore.o: ../../sys/cdefs.h 93locore.o: ../../sys/cdefs.h 94locore.o: ${NEWS3400}/include/param.h 95locore.o: ${NEWS3400}/include/vmparam.h 96locore.o: ${NEWS3400}/include/psl.h 97locore.o: ${NEWS3400}/include/machConst.h 98locore.o: ${NEWS3400}/include/reg.h 99locore.o: ${NEWS3400}/include/machAsmDefs.h 100locore.o: ${NEWS3400}/include/regdef.h 101locore.o: ${NEWS3400}/include/pte.h 102locore.o: ${NEWS3400}/include/endian.h 103locore.o: ${NEWS3400}/include/adrsmap.h 104 ${AS} -c -DLOCORE ${COPTS} ${PARAM} ${NEWS3400}/news3400/locore.s 105 106# the following is necessary because autoconf.o depends on #if GENERIC 107autoconf.o tu.o: Makefile 108 109# the following are necessary because the files depend on the types of 110# vax cpu's included in the system configuration 111clock.o machdep.o autoconf.o conf.o cons.o cpudata.o : Makefile 112 113# depend on network configuration 114af.o uipc_proto.o uipc_domain.o locore.o: Makefile 115 116# depends on kdb being configured 117trap.o: Makefile 118 119assym.h: genassym 120 ./genassym >assym.h 121 122genassym: 123 ${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym \ 124 ${NEWS3400}/news3400/genassym.c 125 126depend: assym.h param.c vnode_if.h 127 mkdep ${COPTS} ${CFILES} ioconf.c 128 mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} \ 129 ${NEWS3400}/news3400/genassym.c 130 131links: 132 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 133 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 134 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 135 sort -u | comm -23 - dontlink | \ 136 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 137 echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks 138 echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks 139 sh makelinks && rm -f dontlink 140 141tags: 142 @echo "see $S/kern/Makefile for tags" 143 144ioconf.o: 145 ${CC} -c ${COPTS} ioconf.c 146 147param.c: $S/conf/param.c 148 rm -f param.c 149 cp $S/conf/param.c . 150 151param.o: param.c Makefile 152 ${CC} -c ${CFLAGS} ${PARAM} param.c 153 154vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src 155 sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 156vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src 157 sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 158 159%RULES 160