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