Commit | Line | Data |
---|---|---|
5ff67f98 | 1 | # |
d2748719 | 2 | # Copyright (c) 1987 Regents of the University of California. |
45c8edda | 3 | # All rights reserved. |
5ff67f98 | 4 | # |
45c8edda | 5 | # Redistribution and use in source and binary forms are permitted |
57a981eb KB |
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. | |
45c8edda | 16 | # |
b4910fca | 17 | # @(#)Makefile 5.8 (Berkeley) %G% |
ce5e9df4 | 18 | # |
d2748719 KB |
19 | CFLAGS= -O |
20 | LIBC= /lib/libc.a | |
21 | C2= /lib/c2 | |
22 | INLINE= /sys/machine/inline/inline | |
23 | SRCS= af.c if.c input.c main.c output.c startup.c tables.c timer.c \ | |
24 | trace.c inet.c | |
9e3338b9 | 25 | OBJS= af.o if.o input.o main.o output.o startup.o tables.o timer.o \ |
2198ed48 | 26 | trace.o inet.o |
7f5c2448 | 27 | HDRS= af.h defs.h interface.h table.h trace.h |
b4910fca | 28 | MAN= routed.0 |
9e3338b9 | 29 | |
d2748719 | 30 | all: routed |
9e3338b9 | 31 | |
b4910fca | 32 | routed: ${OBJS} ${LIBC} |
d2748719 | 33 | ${CC} -o $@ ${CFLAGS} ${OBJS} |
9e3338b9 | 34 | |
7eb13f75 MK |
35 | # The following can be deleted where not appropriate to use the kernel's |
36 | # inline code expansions. | |
37 | .c.o: | |
38 | ${CC} -S ${CFLAGS} $*.c | |
848fd4d5 | 39 | ${C2} $*.s | ${INLINE} | ${AS} -o $*.o |
7eb13f75 MK |
40 | rm -f $*.s |
41 | ||
b4910fca | 42 | clean: |
7f5c2448 | 43 | rm -f ${OBJS} core routed |
45c8edda | 44 | (cd tools; make ${MFLAGS} clean) |
d2748719 | 45 | |
b4910fca MK |
46 | cleandir: clean |
47 | rm -f ${MAN} tags .depend | |
48 | (cd tools; make ${MFLAGS} cleandir) | |
49 | ||
50 | depend: ${SRCS} | |
d2748719 | 51 | mkdep ${CFLAGS} ${SRCS} |
45c8edda | 52 | (cd tools; make ${MFLAGS} depend) |
d2748719 | 53 | |
b4910fca | 54 | install: ${MAN} |
d2748719 | 55 | install -s -o bin -g bin -m 755 routed ${DESTDIR}/etc/routed |
b4910fca | 56 | install -c -o bin -g bin -m 444 routed.0 ${DESTDIR}/usr/man/cat8 |
d2748719 | 57 | |
b4910fca | 58 | lint: ${SRCS} |
d2748719 KB |
59 | lint ${CFLAGS} ${SRCS} |
60 | ||
b4910fca | 61 | tags: ${SRCS} |
7f5c2448 | 62 | ctags ${HDRS} ${SRCS} |
45c8edda | 63 | (cd tools; make ${MFLAGS} tags) |