xref: /original-bsd/sys/pmax/stand/Makefile (revision 6d1ae8f8)
1#	@(#)Makefile	8.4 (Berkeley) 07/03/94
2
3DESTDIR=
4STAND=	../../stand
5INCPATH=-I. -I/sys
6VPATH=	${STAND}
7
8# RELOC=80300000 allows for boot prog up to 2D0000 (2949120) bytes long
9RELOC=	80300000
10
11DEFS= -DSTANDALONE -DSMALL
12CFLAGS=	-O2 ${INCPATH} ${DEFS}
13AFLAGS=	-O2 ${INCPATH} ${DEFS} -DLOCORE
14
15DRIVERS= rz.c
16SRCS=	${DRIVERS}
17LIBS=	libdrive.a libsa/libsa.a ../../libkern/obj/libkern.a
18
19ALL=	boot mkboot mkboottape dec_label
20
21.s.o:
22	${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
23	    ${AS} -o ${.TARGET}
24
25all: ${ALL}
26
27libsa/libsa.a::
28	cd libsa; make
29
30libdrive.a: conf.o ${DRIVERS:.c=.o}
31	ar crv $@ $?
32	ranlib $@
33
34# depend on DEFS
35
36# bootable from real disks
37
38boot:	start.o boot.o bootconf.o ${LIBS}
39	ld -N -Ttext ${RELOC} -e start start.o boot.o bootconf.o ${LIBS} -o $@
40
41start.o: start.s
42	${CPP} -E ${CFLAGS:M-[ID]*} -DLOCORE ${AINC} ${.IMPSRC} | \
43	    ${AS} -o ${.TARGET}
44
45bootconf.o: conf.o
46	rm -f bootconf.c
47	ln -s conf.c bootconf.c
48	${CC} -c ${CFLAGS} -DBOOT bootconf.c
49	rm -f bootconf.c
50
51mkboot: mkboot.c
52	${CC} ${CFLAGS} -o mkboot mkboot.c
53
54mkboottape: mkboottape.c
55	${CC} ${CFLAGS} -o mkboottape mkboottape.c
56
57dec_label: dec_label.c
58	${CC} ${CFLAGS} -o dec_label dec_label.c
59
60# utilities
61
62clean cleandir:
63	rm -f .depend *.o *.exe *.i errs make.out core*
64	rm -f a.out ${ALL}
65	rm -f boot[a-z][a-z] [a-z][a-z]boot
66	rm -f libdrive.a
67	cd libsa; make cleandir
68
69install:
70	./mkboot boot rzboot bootrz
71	install -o bin -g bin -m 444 rzboot ${DESTDIR}/usr/mdec
72	install -o bin -g bin -m 444 bootrz ${DESTDIR}/usr/mdec
73
74depend: ${SRCS}
75	mkdep ${INCPATH} ${DEFS} ${SRCS}
76	mkdep -a -p ${INCPATH} ${DEFS} mkboot.c mkboottape.c
77	cd libsa; make depend
78