#
# Makefile.tmpl,v 3.1 1993/07/06 01:12:07 jbj Exp
#
PROGRAM=	xntpres
#
# xntpres - name resolver support for xntpd
#
COMPILER= cc
COPTS= -O
BINDIR=	/usr/local
INSTALL= install
DEFS=
DEFS_LOCAL=
RESLIB=
COMPAT=
#
INCL=		-I../include
CFLAGS=		$(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
CC=		$(COMPILER)
LIB=		../lib/libntp.a
LINTLIB=	../lib/llib-llibntp.ln
MAKE=		make
#
OBJS=	xntpres.o
SOURCE=	xntpres.c

all:	$(PROGRAM)

$(PROGRAM): $(OBJS) version.o $(LIB)
	$(CC) $(COPTS) -o $@ $(OBJS) version.o $(LIB) $(RESLIB) $(COMPAT)

install:	$(PROGRAM)
	$(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)

tags:
	ctags *.c *.h

depend:
	mkdep $(CFLAGS) $(SOURCE)

clean:
	rm -f $(PROGRAM) *.o *.out tags make.log Makefile.bak lint.errs

distclean:	clean
	rm -f *.orig *.rej Makefile

lint:	$(LINTLIB)
	lint -x -u $(DEFS) $(DEFS_LOCAL) $(INCL) $(LINTLIB) $(SOURCE) >lint.errs

../lib/llib-llibntp.ln:
	cd ../lib ; $(MAKE) $(MFLAGS) lintlib

../libc/libntp.a:
	cd ../libntp ; $(MAKE) $(MFLAGS)

