xref: /original-bsd/sys/vax/mdec/Makefile (revision b424313c)
1#
2# Copyright (c) 1980, 1986, 1987 Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
6# provided that this notice is preserved and that due credit is given
7# to the University of California at Berkeley. The name of the University
8# may not be used to endorse or promote products derived from this
9# software without specific prior written permission. This software
10# is provided ``as is'' without express or implied warranty.
11#
12#	@(#)Makefile	7.4 (Berkeley) 03/13/88
13#
14CFLAGS=	-DLOCORE
15
16# source files that live in the current directory
17SRCS=	hkboot.c hpboot.c htboot.c mtboot.c raboot.c rlboot.c upboot.c \
18	utboot.c tmboot.c tsboot.c tuboot.c httoggle.s mttoggle.s \
19	tmtoggle.s tstoggle.s uttoggle.s
20
21# boot blocks that are preprocessed, then assembled
22BOOTS=	hkboot hpboot htboot mtboot raboot rdboot rlboot upboot utboot \
23	tmboot tmscpboot tsboot tuboot
24
25# toggle files that are assembled, but not installed
26TOGGLES=httoggle mttoggle tmtoggle tstoggle uttoggle
27
28all: ${BOOTS} ${TOGGLES} noboot
29
30${BOOTS}:
31	${CC} -E ${CFLAGS} $@.c | as
32	nm -u a.out
33	strip a.out
34	dd if=a.out bs=32 skip=1 of=b.out
35	dd if=b.out of=$@ conv=sync
36	rm b.out
37
38${TOGGLES}:
39	as $@.s
40	nm -u a.out
41	strip a.out
42	dd if=a.out bs=32 skip=1 of=$@
43
44noboot:
45	echo | dd of=noboot conv=sync
46
47clean:
48	rm -f a.out b.out ${BOOTS} ${TOGGLES} noboot
49
50install:
51	install -o bin -g bin -m 444 ${BOOTS} ${DESTDIR}/usr/mdec
52	rm -f ${DESTDIR}/usr/mdec/mboot ${DESTDIR}/usr/mdec/uboot
53	ln ${DESTDIR}/usr/mdec/htboot ${DESTDIR}/usr/mdec/mboot
54	ln ${DESTDIR}/usr/mdec/hpboot ${DESTDIR}/usr/mdec/uboot
55
56depend:
57	mkdep -p ${CFLAGS} ${SRCS}
58
59# DO NOT DELETE THIS LINE -- mkdep uses it.
60# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
61
62hkboot: hkboot.c /usr/include/sys/disklabel.h
63hpboot: hpboot.c /usr/include/sys/disklabel.h
64htboot: htboot.c
65mtboot: mtboot.c
66raboot: raboot.c /usr/include/sys/disklabel.h
67rlboot: rlboot.c /usr/include/sys/disklabel.h
68upboot: upboot.c /usr/include/sys/disklabel.h
69utboot: utboot.c
70tmboot: tmboot.c
71tsboot: tsboot.c
72tuboot: tuboot.c
73httoggle: httoggle.s
74mttoggle: mttoggle.s
75tmtoggle: tmtoggle.s
76tstoggle: tstoggle.s
77uttoggle: uttoggle.s
78
79# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
80