Commit | Line | Data |
---|---|---|
252367af DF |
1 | # |
2 | # Copyright (c) 1980 Regents of the University of California. | |
3 | # All rights reserved. The Berkeley software License Agreement | |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
ca67e7b4 | 6 | # @(#)Makefile 5.6 (Berkeley) 10/26/87 |
252367af | 7 | # |
ca67e7b4 | 8 | SCCSID = @(#)Makefile 5.6 10/26/87 |
a0820bd4 KM |
9 | INSTALL = ${DESTDIR}/usr/ucb |
10 | INSTALLIB = ${DESTDIR}/usr/lib | |
0e9a3c04 | 11 | SRCDIR= ../src |
ad3646af | 12 | PX_HEADER = px_header |
ba78bc7f KM |
13 | NM = nm -go |
14 | RM = rm -f | |
0e9a3c04 | 15 | CFLAGS = -O -I${SRCDIR} |
a0820bd4 | 16 | |
940d0fc6 | 17 | PROGS = pc pix pmerge |
c8e207f1 | 18 | FILES = pcexterns.o how_pc how_pi how_pix how_pxp |
ad3646af PA |
19 | |
20 | all: pix px_header pc pc2 pc3 pmerge pcexterns.o | |
a0820bd4 KM |
21 | |
22 | install: all pxref.p | |
ad3646af | 23 | dd if=px_header of=temp conv=sync |
c8e207f1 | 24 | install -m 644 temp ${INSTALLIB}/${PX_HEADER} |
796a0e76 | 25 | for i in ${PROGS}; do (install -s $$i ${INSTALL}/$$i ); done |
c8e207f1 | 26 | for i in ${FILES}; do (install -m 644 -c $$i ${INSTALLIB}/$$i ); done |
796a0e76 | 27 | install -s pc3 ${INSTALLIB}/pc3 |
6693fe73 | 28 | cd pc2; make DESTDIR=${DESTDIR} install |
ad3646af | 29 | -pc -w pxref.p |
796a0e76 | 30 | install -s a.out ${INSTALL}/pxref |
ad3646af PA |
31 | |
32 | pix: pix.c config.o | |
33 | ${CC} ${CFLAGS} -o pix pix.c config.o | |
a0820bd4 KM |
34 | |
35 | pmerge: pmerge.c | |
0e9a3c04 | 36 | ${CC} ${CFLAGS} -o pmerge pmerge.c |
a0820bd4 | 37 | |
ad3646af PA |
38 | px_header: px_header.c ${SRCDIR}/objfmt.h config.o |
39 | ${CC} ${CFLAGS} -o px_header px_header.c config.o -N | |
40 | strip px_header | |
41 | ||
78827838 KM |
42 | pc2: /tmp |
43 | cd pc2; make | |
a0820bd4 | 44 | |
0e9a3c04 SL |
45 | pc3: pc3.c pc3.h ${SRCDIR}/pstab.h |
46 | ${CC} ${CFLAGS} pc3.c -o pc3 | |
a0820bd4 KM |
47 | |
48 | pxref: pxref.p | |
49 | pc -w pxref.p -o pxref | |
50 | ||
51 | pc: pc.c | |
0e9a3c04 | 52 | ${CC} ${CFLAGS} -o pc pc.c |
a0820bd4 | 53 | |
ad3646af PA |
54 | LIBPC = /usr/lib/libpc.a |
55 | LIBC = /lib/libc.a | |
56 | LIBM = /usr/lib/libm.a | |
57 | LIBG = /usr/lib/libg.a | |
58 | D_LIBPC = $(DESTDIR)$(LIBPC) | |
59 | D_LIBC = $(DESTDIR)$(LIBC) | |
60 | D_LIBM = $(DESTDIR)$(LIBM) | |
61 | D_LIBG = $(DESTDIR)$(LIBG) | |
62 | LIBRARIES = $(D_LIBPC) $(D_LIBC) $(D_LIBM) $(D_LIBG) | |
c0cbd09f PK |
63 | |
64 | pcexterns.o: pcexterns.awk ${LIBRARIES} | |
ad3646af | 65 | ( echo -n $(LIBPC):; ${NM} $(D_LIBPC) ) \ |
ce6146f3 KM |
66 | | awk -f pcexterns.awk \ |
67 | | sort -t\" +1 -2 -u >pcexterns.s | |
ad3646af | 68 | ( echo -n $(LIBC):; ${NM} $(D_LIBC) ) \ |
ce6146f3 KM |
69 | | awk -f pcexterns.awk \ |
70 | | sort -t\" +1 -2 -u >>pcexterns.s | |
ad3646af | 71 | ( echo -n $(LIBM):; ${NM} $(D_LIBM) ) \ |
ce6146f3 KM |
72 | | awk -f pcexterns.awk \ |
73 | | sort -t\" +1 -2 -u >>pcexterns.s | |
ad3646af | 74 | ( echo -n $(LIBG):; ${NM} $(D_LIBG) ) \ |
ce6146f3 KM |
75 | | awk -f pcexterns.awk \ |
76 | | sort -t\" +1 -2 -u >>pcexterns.s | |
ba78bc7f KM |
77 | as pcexterns.s -o pcexterns.o |
78 | ${RM} pcexterns.s | |
79 | ||
0e9a3c04 SL |
80 | opcode.h: ${SRCDIR}/OPnames.h ${SRCDIR}/opc.c |
81 | ${RM} opcode.h | |
82 | cc ${SRCDIR}/opc.c -o opc | |
83 | opc >opcode.h | |
84 | ${RM} opc | |
85 | ||
86 | picture: ${SRCDIR}/OPnames.h ${SRCDIR}/pic.c | |
87 | ${RM} picture | |
88 | cc ${SRCDIR}/pic.c -o pic | |
89 | pic >picture | |
90 | ${RM} pic | |
91 | ||
a0820bd4 | 92 | clean: |
78827838 | 93 | ${RM} pix px_header pxref pmerge pc pc3 \ |
0e9a3c04 | 94 | pcexterns.s *.o errs opc opc.c pic pic.c picture |
71204e9b | 95 | cd pc2; make clean |
a0820bd4 | 96 | |
0e9a3c04 | 97 | print: picture |
02577293 | 98 | @pr READ_ME Makefile picture |
a0820bd4 | 99 | @ls -l | pr |
78827838 | 100 | @pr pix.c pmerge.c pxref.p pc.c pc3.h pc3.c |
02577293 KB |
101 | |
102 | depend: |