summaryrefslogtreecommitdiff
path: root/sys/arch/vax/conf/Makefile.vax
blob: 0443a62c2e0f9fa09798a035da2288bd8fb698e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#	$NetBSD: Makefile.vax,v 1.12 1995/09/19 23:57:55 thorpej Exp $

#	@(#)Makefile.vax	7.18 (Berkeley) 12/16/90
#
# 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
#
CC=	cc
CPP=	cpp
LD=	/usr/bin/ld
AWK=	awk

S=	../../../..
VAX=	../..

INCLUDES= -I. -I$S/arch -I$S -I$S/sys
COPTS=	${INCLUDES} ${IDENT} -D_KERNEL -D_VAX_INLINE_
AOPTS=  ${COPTS} -DASSEMBLER
CFLAGS=	-Werror ${COPTS}
LOAD_ADDRESS=80000000

### find out what to use for libkern
.include "$S/lib/libkern/Makefile.inc"
.ifndef PROF
LIBKERN=	${KERNLIB}
.else
LIBKERN=        ${KERNLIB_PROF}
.endif

### find out what to use for libcompat
.include "$S/compat/common/Makefile.inc"
.ifndef PROF
LIBCOMPAT=      ${COMPATLIB}
.else
LIBCOMPAT=      ${COMPATLIB_PROF}
.endif

NORMAL_C= ${CC} -O -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
NORMAL_S= ${CC} -x assembler-with-cpp -E -I. -DLOCORE ${COPTS} $< | \
	${AS} ${ASFLAGS} -o $*.o
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
SYSTEM_ASMS=intvec.o subr.o
SYSTEM_OBJS=${SYSTEM_ASMS} lim.o vnode_if.o ${OBJS} param.o ioconf.o \
	    ${LIBKERN} ${LIBCOMPAT}
#SYSTEM_DEP=${SYSTEM_ASMS} lovm.o pmap.o
SYSTEM_DEP=${SYSTEM_ASMS} ${SYSTEM_OBJS}
SYSTEM_LD_HEAD=         @echo loading $@; rm -f $@
SYSTEM_LD= ${LD} -Z -e _start -T ${LOAD_ADDRESS} -o $@ ${SYSTEM_OBJS} vers.o
#SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; ${DBSYM} -f
SYSTEM_LD_TAIL=@echo Nu {r k{rnan klar!!!!


%OBJS

%CFILES

%LOAD

clean::
	rm -f eddep *vmunix tags *.o subr.i [a-tv-z]*.s \
	Errs errs linterrs makelinks vnode_if.* genassym

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

intvec.o: ${VAX}/vax/intvec.s
	${CC} -x assembler-with-cpp -E ${AOPTS} ${VAX}/vax/intvec.s| as -o intvec.o

subr.o: ${VAX}/vax/subr.s
	${CC} -x assembler-with-cpp -E ${AOPTS} ${VAX}/vax/subr.s| as -o subr.o


depend: ${CFILES}
	mkdep ${COPTS} ${.ALLSRC:M*.c} ioconf.c
	mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM}

ioconf.o:
	${CC} -c ${CFLAGS} ${PARAM} ioconf.c

lim.o:	Makefile
	../../conf/mkoldconf.awk < ioconf.c > lim.c
	${CC} -O -c ${CFLAGS} ${PARAM} lim.c

param.c: $S/conf/param.c
	rm -f param.c
	cp $S/conf/param.c .

param.o: param.c Makefile
	${CC} -O -c ${CFLAGS} ${PARAM} param.c

conf.o: ${VAX}/vax/conf.c
	${CC} -O -c ${CFLAGS} ${PARAM} ${VAX}/vax/conf.c

newvers:
	sh $S/conf/newvers.sh
	${CC} ${CFLAGS} -c vers.c

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


%RULES