1# @(#)Makefile.news3400 7.2 (Berkeley) 06/04/92 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 23GCC= YES 24 25.if ${GCC} == YES 26CC= gcc -traditional -nostdinc 27AS= cc2.11 -I 28LD= /usr/local/gnu/lib/gcc-lib/mips-sony-bsd/2.1/ld 29QUAD= -DUSE_QUAD 30FAKEMAIN= -Dmain=Main 31.else 32CC= cc2.11 -I 33AS= cc2.11 -I 34LD= /usr/bin/ld 35QUAD= 36.endif 37 38S= ../.. 39NEWS3400= $S/news3400 40 41INCLUDES= -I. -I$S -I$S/sys 42COPTS= ${INCLUDES} ${IDENT} -DKERNEL ${QUAD} ${FAKEMAIN} 43CFLAGS= ${COPTS} 44AHEADS= 45 46INLINECMD= ${NEWS3400}/inline/obj/inline 47INLINE= ${INLINECMD} ${INLINEOPTS} 48 49 50# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} 51# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix, 52# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file 53# is marked as config-dependent. 54 55NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 56NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< 57 58DRIVER_C= ${CC} -c ${COPTS} ${PROF} $< 59DRIVER_C_C= ${CC} -c ${COPTS} ${PROF} ${PARAM} $< 60 61NORMAL_S= ${AS} -c ${COPTS} $< 62NORMAL_S_C= ${AS} -c ${COPTS} ${PARAM} $< 63 64%OBJS 65 66%CFILES 67 68# load lines for config "xxx" will be emitted as: 69# xxx: ${SYSTEM_DEP} swapxxx.o 70# ${SYSTEM_LD_HEAD} 71# ${SYSTEM_LD} swapxxx.o 72# ${SYSTEM_LD_TAIL} 73SYSTEM_OBJ= locore.o ${OBJS} param.o ioconf.o vers.o 74#SYSTEM_DEP= Makefile symbols.sort ${SYSTEM_OBJ} 75SYSTEM_DEP= Makefile ${SYSTEM_OBJ} 76SYSTEM_LD_HEAD= rm -f $@ 77SYSTEM_LD= @echo loading vmunix;\ 78 ${LD} -N -o $@ -e start -T 80001000 ${SYSTEM_OBJ} libquad.a 79SYSTEM_LD_TAIL= 80#SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@ 81 82%LOAD 83 84newvers vers.c: 85 sh $S/conf/newvers.sh 86 87clean: 88 rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s \ 89 Errs errs linterrs makelinks 90 91lint: /tmp param.c 92 @lint -hbxn -DGENERIC ${COPTS} ${PARAM} \ 93 ${NEWS3400}/news3400/Locore.c ${CFILES} ioconf.c param.c | \ 94 grep -v 'struct/union .* never defined' | \ 95 grep -v 'possible pointer alignment problem' 96 97#symbols.sort: ${NEWS3400}/news3400/symbols.raw 98# grep -v '^#' ${NEWS3400}/news3400/symbols.raw \ 99# | sed 's/^ //' | sort -u > symbols.sort 100 101${INLINECMD}: 102 cd ${NEWS3400}/inline; make 103 104locore.o: assym.h ${AHEADS} ${NEWS3400}/news3400/locore.s 105locore.o: ${NEWS3400}/include/pte.h 106locore.o: ${NEWS3400}/include/cpu.h 107locore.o: 108 ${AS} -c -DLOCORE ${COPTS} ${PARAM} ${NEWS3400}/news3400/locore.s 109 110# the following is necessary because autoconf.o depends on #if GENERIC 111autoconf.o tu.o: Makefile 112 113# the following are necessary because the files depend on the types of 114# vax cpu's included in the system configuration 115clock.o machdep.o autoconf.o conf.o cons.o cpudata.o : Makefile 116 117# depend on network configuration 118af.o uipc_proto.o uipc_domain.o locore.o: Makefile 119 120# depends on kdb being configured 121trap.o: Makefile 122 123# depend on maxusers 124assym.h: Makefile 125assym.h: $S/sys/param.h ${NEWS3400}/include/pte.h $S/sys/buf.h 126assym.h: $S/sys/vmmeter.h $S/sys/dir.h 127assym.h: $S/sys/map.h $S/sys/proc.h $S/sys/msgbuf.h 128assym.h: $S/sys/user.h ${NEWS3400}/news3400/genassym.c 129assym.h: ${NEWS3400}/include/param.h ${NEWS3400}/include/pcb.h 130assym.h: ${NEWS3400}/include/vmparam.h 131 132assym.h: genassym 133 ./genassym >assym.h 134 135genassym: 136 ${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${NEWS3400}/news3400/genassym.c 137 138depend: assym.h ${CFILES} 139 mkdep ${COPTS} ${.ALLSRC:M*.c} ioconf.c 140 mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${NEWS3400}/news3400/genassym.c 141 142links: 143 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 144 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 145 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 146 sort -u | comm -23 - dontlink | \ 147 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 148 echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks 149 echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks 150 sh makelinks && rm -f dontlink 151 152tags: 153 @echo "see $S/kern/Makefile for tags" 154 155ioconf.o: 156 ${CC} -c ${COPTS} ioconf.c 157 158param.c: $S/conf/param.c 159 rm -f param.c 160 cp $S/conf/param.c . 161 162param.o: param.c Makefile 163 ${CC} -c ${CFLAGS} ${PARAM} param.c 164 165%RULES 166