xref: /original-bsd/usr.sbin/timed/timed/Makefile (revision 982436bd)
1#
2# Copyright (c) 1987 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.8 (Berkeley) 05/11/89
18#
19# optional flags are: MEASURE TESTING DEBUG
20#
21CFLAGS=	-O
22LIBC=	/lib/libc.a
23SRCDS=	acksend.c candidate.c correct.c master.c networkdelta.c readmsg.c \
24	slave.c timed.c
25OBJDS=	acksend.o candidate.o correct.o master.o networkdelta.o readmsg.o \
26	slave.o timed.o
27SRCCS=	cmds.c cmdtab.c timedc.c
28OBJCS=	cmds.o cmdtab.o timedc.o
29COMMS=	byteorder.c measure.c cksum.${MACHINE}.c
30COMMO=	byteorder.o measure.o cksum.${MACHINE}.o
31MAN=	timedc.0 timed.0
32
33all: timed timedc
34
35timed: ${OBJDS} ${COMMO} ${LIBC}
36	${CC} ${CFLAGS} ${OBJDS} ${COMMO} ${LIBS} -o $@ -lutil
37
38timedc: ${OBJCS} ${COMMO} ${LIBC}
39	${CC} ${CFLAGS} ${OBJCS} ${COMMO} ${LIBS} -o $@ -lutil
40
41cksum.${MACHINE}.o:
42	${CC} ${CFLAGS} -c $*.c
43
44clean:
45	rm -f ${OBJDS} ${OBJCS} ${COMMO} core timed timedc
46
47cleandir: clean
48	rm -f ${MAN} tags .depend
49
50depend: ${SRCS}
51	mkdep ${CFLAGS} ${SRCDS} ${SRCCS} ${COMMS}
52
53install: ${MAN}
54	install -s -o bin -g bin -m 755 timed ${DESTDIR}/usr/sbin/timed
55	install -s -o root -g bin -m 4511 timedc ${DESTDIR}/usr/sbin/timedc
56	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
57
58lint: ${SRCS}
59	lint ${CFLAGS} ${SRCDS} ${COMMS}
60	lint ${CFLAGS} ${SRCCS} ${COMMS}
61
62tags: ${SRCS}
63	ctags ${SRCDS} ${SRCCS} ${COMMS}
64