#
# Copyright (c) 1987 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the University of California, Berkeley.  The name of the
# University may not be used to endorse or promote products derived
# from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
#	@(#)Makefile	2.7 (Berkeley) 6/18/88
#
# optional flags are: MEASURE TESTING DEBUG MNOADJUST GETTIME
#	MNOADJUST prevents the master timed from changing it's own time
#	GETTIME assumes that the time is reasonably close on startup of
#		timed and an ADJTIME is sent instead of SETTIME
DEFINES=	-DMNOADJUST 
SRCDS=	acksend.c candidate.c correct.c master.c networkdelta.c readmsg.c \
	slave.c timed.c
OBJDS=	acksend.o candidate.o correct.o master.o networkdelta.o readmsg.o \
	slave.o timed.o
SRCCS=	cmds.c cmdtab.c timedc.c
OBJCS=	cmds.o cmdtab.o timedc.o
COMMS=	byteorder.c measure.c cksum.c ${MACHCOMMS}
COMMO=	byteorder.o measure.o cksum.o ${MACHCOMMO}

#if defined(mips) && defined(ultrix)
MACHCOMMS=in_checksum.s
MACHCOMMO=in_checksum.o
#endif

SimpleProgram(timed,${OBJDS} ${COMMO},,/etc/timed)
build_program(timedc,${OBJCS} ${COMMO},,)
install_program(timedc,-o root -m 4755,/etc/timedc)

install_man(timed.8,timed.8)
install_man(timedc.8,timedc.8)

lint:: FRC
	lint ${CFLAGS} ${SRCDS} ${COMMS}
	lint ${CFLAGS} ${SRCCS} ${COMMS}

tags:: FRC
	ctags ${SRCDS} ${SRCCS} ${COMMS}

