1995-02-13 03:41:55 +03:00
|
|
|
# $NetBSD: Makefile.vax,v 1.5 1995/02/13 00:41:56 ragge Exp $
|
1994-10-26 11:01:33 +03:00
|
|
|
|
|
|
|
# @(#)Makefile.vax 7.18 (Berkeley) 12/16/90
|
1994-08-03 00:18:46 +04:00
|
|
|
#
|
|
|
|
# This makefile is constructed from a machine description:
|
|
|
|
# config machineid
|
|
|
|
# Most changes should be made in the machine description
|
|
|
|
# /sys/vax/conf/``machineid''
|
|
|
|
# after which you should do
|
|
|
|
# config machineid
|
|
|
|
# Machine generic makefile changes should be made in
|
|
|
|
# /sys/conf/Makefile.``machinetype''
|
|
|
|
# after which config should be rerun for all machines of that type.
|
|
|
|
#
|
|
|
|
# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
|
|
|
|
# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
|
|
|
|
#
|
|
|
|
# -DTRACE compile in kernel tracing hooks
|
|
|
|
# -DQUOTA compile in file system quotas
|
|
|
|
# -DUUDMA compile in unibus tu58 pseudo-dma code
|
|
|
|
#
|
|
|
|
C2= /usr/libexec/cc1
|
|
|
|
CC= cc
|
|
|
|
CPP= cpp
|
|
|
|
LD= /usr/bin/ld
|
1994-10-08 18:42:27 +03:00
|
|
|
AWK= awk
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
S= ../../../..
|
|
|
|
VAX= ../..
|
|
|
|
|
|
|
|
INCLUDES= -I. -I$S/arch -I$S -I$S/sys
|
|
|
|
COPTS= ${INCLUDES} ${IDENT} -DKERNEL
|
|
|
|
AOPTS= ${COPTS} -DASSEMBLER
|
|
|
|
CFLAGS= ${COPTS}
|
|
|
|
LOAD_ADDRESS=80000000
|
|
|
|
|
|
|
|
INLINECMD= ${VAX}/inline/obj/inline
|
|
|
|
INLINE= ${INLINECMD} ${INLINEOPTS}
|
|
|
|
|
|
|
|
#AHEADS= ${VAX}/vax/pcb.m
|
|
|
|
|
|
|
|
### find out what to use for libkern
|
|
|
|
.include "$S/lib/libkern/Makefile.inc"
|
|
|
|
.ifndef PROF
|
|
|
|
LIBKERN=../../../../lib/libkern/libkern.a # ${KERNLIB}
|
|
|
|
.else
|
|
|
|
LIBKERN= ${KERNLIB_PROF}
|
|
|
|
.endif
|
|
|
|
|
1995-02-13 03:41:55 +03:00
|
|
|
NORMAL_C= ${CC} -O -c ${CFLAGS} ${PROF} $<
|
1994-08-03 00:18:46 +04:00
|
|
|
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
|
|
|
|
NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
|
|
|
|
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
|
|
|
|
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
|
1994-10-08 18:42:27 +03:00
|
|
|
SYSTEM_ASMS=intvec.o subr.o
|
1995-02-13 03:41:55 +03:00
|
|
|
SYSTEM_OBJS=${SYSTEM_ASMS} lim.o vnode_if.o ${OBJS} param.o ioconf.o ${LIBKERN}
|
1994-08-03 00:18:46 +04:00
|
|
|
#SYSTEM_DEP=${SYSTEM_ASMS} lovm.o pmap.o
|
|
|
|
SYSTEM_DEP=${SYSTEM_ASMS} ${SYSTEM_OBJS}
|
|
|
|
SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
|
1994-10-08 18:42:27 +03:00
|
|
|
SYSTEM_LD= ${LD} -d -e _start -T ${LOAD_ADDRESS} -o $@ ${SYSTEM_OBJS} vers.o
|
1994-08-03 00:18:46 +04:00
|
|
|
#SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; ${DBSYM} -f
|
|
|
|
SYSTEM_LD_TAIL=@echo Nu {r k{rnan klar!!!!
|
|
|
|
|
|
|
|
|
|
|
|
%OBJS
|
|
|
|
|
|
|
|
%CFILES
|
|
|
|
|
|
|
|
%LOAD
|
|
|
|
|
|
|
|
clean:
|
1994-10-08 18:42:27 +03:00
|
|
|
rm -f eddep *vmunix tags *.o subr.i [a-tv-z]*.s \
|
|
|
|
Errs errs linterrs makelinks vnode_if.*
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
lint: /tmp param.c
|
|
|
|
@lint -hbxn -DGENERIC ${COPTS} ${PARAM} \
|
|
|
|
${VAX}/vax/Locore.c ${CFILES} ioconf.c param.c | \
|
|
|
|
grep -v 'struct/union .* never defined' | \
|
|
|
|
grep -v 'possible pointer alignment problem'
|
|
|
|
|
|
|
|
symbols.sort: ${VAX}/vax/symbols.raw
|
|
|
|
grep -v '^#' ${VAX}/vax/symbols.raw \
|
|
|
|
| sed 's/^ //' | sort -u > symbols.sort
|
|
|
|
|
|
|
|
${INLINECMD}:
|
|
|
|
cd ${VAX}/inline; make
|
|
|
|
|
|
|
|
intvec.o: ${VAX}/vax/intvec.s
|
|
|
|
${CC} -x assembler-with-cpp -E ${AOPTS} ${VAX}/vax/intvec.s| as -o intvec.o
|
|
|
|
|
1994-10-08 18:42:27 +03:00
|
|
|
subr.o: ${VAX}/vax/subr.s
|
|
|
|
${CC} -x assembler-with-cpp -E ${AOPTS} ${VAX}/vax/subr.s| as -o subr.o
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Den h{r filen borde st{das upp och fixas till, det blir nog n{r
|
|
|
|
# glue-filerna g|r vad dom ska :)
|
|
|
|
|
|
|
|
#emulate.o: ${VAX}/vax/emulate.s
|
|
|
|
# cpp -I. ${COPTS} ${VAX}/vax/emulate.s | ${AS} -o emulate.o
|
|
|
|
|
|
|
|
# the following is necessary because autoconf.o depends on #if GENERIC
|
1995-02-13 03:41:55 +03:00
|
|
|
#autoconf.o tu.o: Makefile
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
# the following are necessary because the files depend on the types of
|
|
|
|
# vax cpu's included in the system configuration
|
1995-02-13 03:41:55 +03:00
|
|
|
#clock.o machdep.o autoconf.o conf.o cons.o cpudata.o : Makefile
|
|
|
|
#crl.o flp.o mba.o uba.o vaxcpu.o : Makefile
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
# depend on network configuration
|
1994-10-08 18:42:27 +03:00
|
|
|
#af.o uipc_proto.o uipc_domain.o subr.o: Makefile
|
1995-02-13 03:41:55 +03:00
|
|
|
lim.o: Makefile
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
# depends on kdb being configured
|
1995-02-13 03:41:55 +03:00
|
|
|
#trap.o: Makefile
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
# depend on maxusers
|
|
|
|
assym.s: Makefile
|
|
|
|
|
|
|
|
assym.s: genassym
|
|
|
|
./genassym >assym.s
|
|
|
|
|
|
|
|
genassym:
|
|
|
|
${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${VAX}/vax/genassym.c
|
|
|
|
|
|
|
|
depend: assym.s ${CFILES}
|
|
|
|
mkdep ${COPTS} ${.ALLSRC:M*.c} ioconf.c
|
|
|
|
mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${VAX}/vax/genassym.c
|
|
|
|
|
|
|
|
links:
|
|
|
|
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
|
|
|
|
sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
|
|
|
|
echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
|
|
|
|
sort -u | comm -23 - dontlink | \
|
|
|
|
sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
|
|
|
|
echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks
|
|
|
|
echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks
|
|
|
|
sh makelinks && rm -f dontlink
|
|
|
|
|
|
|
|
tags:
|
|
|
|
@echo "see $S/kern/Makefile for tags"
|
|
|
|
|
|
|
|
ioconf.o:
|
|
|
|
${CC} -c ${CFLAGS} ${PARAM} ioconf.c
|
|
|
|
|
|
|
|
# ${CC} -c -S ${COPTS} ioconf.c
|
|
|
|
# cat ioconf.s | ${INLINE} | ${AS} -o ioconf.o
|
|
|
|
# rm -f ioconf.s
|
|
|
|
|
1995-02-13 03:41:55 +03:00
|
|
|
lim.o: Makefile
|
|
|
|
../../conf/mkoldconf.awk < ioconf.c > lim.c
|
|
|
|
${CC} -O -c ${CFLAGS} ${PARAM} lim.c
|
|
|
|
|
1994-08-03 00:18:46 +04:00
|
|
|
param.c: $S/conf/param.c
|
|
|
|
rm -f param.c
|
|
|
|
cp $S/conf/param.c .
|
|
|
|
|
|
|
|
param.o: param.c Makefile
|
1995-02-13 03:41:55 +03:00
|
|
|
${CC} -O -c ${CFLAGS} ${PARAM} param.c
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
conf.o: ${VAX}/vax/conf.c
|
1995-02-13 03:41:55 +03:00
|
|
|
${CC} -O -c ${CFLAGS} ${PARAM} ${VAX}/vax/conf.c
|
1994-08-03 00:18:46 +04:00
|
|
|
|
|
|
|
newvers:
|
|
|
|
sh $S/conf/newvers.sh
|
|
|
|
${CC} ${CFLAGS} -c vers.c
|
|
|
|
|
1994-10-08 18:42:27 +03:00
|
|
|
vnode_if.c vnode_if.h : $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
|
|
|
AWK="${AWK}" sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
|
|
|
|
|
|
|
|
1994-08-03 00:18:46 +04:00
|
|
|
%RULES
|