| 1 | # |
| 2 | # Copyright (c) 1988 The 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 the above copyright notice and this paragraph are |
| 7 | # duplicated in all such forms and that any documentation, |
| 8 | # advertising materials, and other materials related to such |
| 9 | # distribution and use acknowledge that the software was developed |
| 10 | # by the University of California, Berkeley. The name of the |
| 11 | # University may not be used to endorse or promote products derived |
| 12 | # from this software without specific prior written permission. |
| 13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
| 14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 16 | # |
| 17 | # @(#)Makefile 5.2 (Berkeley) %G% |
| 18 | # |
| 19 | LIBC= /lib/libc.a |
| 20 | AS= ../../as/as.vax |
| 21 | VPATH= ../adb |
| 22 | CFLAGS= -I. -I../adb -I${AS} -O |
| 23 | SRCS= access.c command.c expr.c format.c kstack.c machdep.c main.c \ |
| 24 | opset.c optab.c output.c pcs.c print.c rodata.c setup.c strings.c \ |
| 25 | sym.c |
| 26 | OBJS= access.o command.o expr.o format.o kstack.o machdep.o main.o \ |
| 27 | opset.o optab.o output.o pcs.o print.o rodata.o setup.o strings.o \ |
| 28 | sym.o |
| 29 | MAN= adb.0 |
| 30 | |
| 31 | all: adb |
| 32 | |
| 33 | adb: ${OBJS} ${LIBC} |
| 34 | ${CC} -o $@ ${OBJS} |
| 35 | |
| 36 | optab.o rodata.o strings.o: |
| 37 | ${CC} ${CFLAGS} -c -R $< |
| 38 | |
| 39 | instrs.adb: ${AS}/instrs |
| 40 | (echo FLAVOR ADB; cat ${AS}/instrs) | awk -f ${AS}/instrs > instrs.adb |
| 41 | |
| 42 | clean: |
| 43 | rm -f ${OBJS} core adb instrs.adb |
| 44 | |
| 45 | cleandir: clean |
| 46 | rm -f ${MAN} tags .depend |
| 47 | |
| 48 | depend: ${SRCS} |
| 49 | mkdep ${CFLAGS} -I. -I${AS} ${SRCS} |
| 50 | |
| 51 | install: ${MAN} |
| 52 | install -s -o bin -g bin -m 755 adb ${DESTDIR}/bin/adb |
| 53 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 |
| 54 | |
| 55 | lint: ${SRCS} |
| 56 | lint ${CFLAGS} ${SRCS} |
| 57 | |
| 58 | tags: ${SRCS} |
| 59 | ctags ${SRCS} |