#
# Makefile.tmpl,v 3.1 1993/07/06 01:07:38 jbj Exp
#
LIBNAME=	libntp
#
# xntp routines which are used a lot of places
#
COMPILER= cc
COPTS= -O
AUTHDEFS=-DDES
LIBDEFS= -DBIG_ENDIAN
RANLIB=		ranlib
INSTALL= install
CLOCKDEFS=
DEFS=
DEFS_LOCAL=
#
INCL=-I../include
CFLAGS=	$(COPTS) $(AUTHDEFS) $(LIBDEFS) $(DEFS) $(DEFS_LOCAL) $(INCL)
CC=		$(COMPILER)
#
SOURCE=	atoint.c atolfp.c atouint.c auth12crypt.c authdecrypt.c authdes.c \
	authencrypt.c authkeys.c authparity.c authreadkeys.c authusekey.c \
	buftvtots.c caljulian.c calleapwhen.c caltontp.c calyearstart.c \
	clocktime.c dofptoa.c dolfptoa.c emalloc.c fptoa.c fptoms.c getopt.c \
	gettstamp.c hextoint.c hextolfp.c humandate.c inttoa.c \
	lib_strbuf.c mfptoa.c mfptoms.c modetoa.c mstolfp.c \
	msutotsf.c numtoa.c refnumtoa.c numtohost.c octtoint.c \
	prettydate.c ranny.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
	uglydate.c uinttoa.c utvtoa.c hpux.c clocktypes.c \
	parse.c parse_conf.c parse_meinberg.c parse_schmid.c parse_rawdcf.c \
	parse_dcf7000.c md5.c authmd5encrypt.c authmd5decrypt.c \
	authmd512crypt.c decodenetnum.c systime.c msyslog.c syssignal.c \
	findconfig.c

OBJS=	atoint.o atolfp.o atouint.o auth12crypt.o authdecrypt.o authdes.o \
	authencrypt.o authkeys.o authparity.o authreadkeys.o authusekey.o \
	buftvtots.o caljulian.o calleapwhen.o caltontp.o calyearstart.o \
	clocktime.o dofptoa.o dolfptoa.o emalloc.o fptoa.o fptoms.o getopt.o \
	gettstamp.o hextoint.o hextolfp.o humandate.o inttoa.o \
	lib_strbuf.o mfptoa.o mfptoms.o modetoa.o mstolfp.o \
	msutotsf.o numtoa.o refnumtoa.o numtohost.o octtoint.o \
	prettydate.o ranny.o tsftomsu.o tstotv.o tvtoa.o tvtots.o \
	uglydate.o uinttoa.o utvtoa.o hpux.o clocktypes.o \
	parse.o parse_conf.o parse_meinberg.o parse_schmid.o parse_rawdcf.o \
	parse_dcf7000.o	md5.o authmd5encrypt.o authmd5decrypt.o \
	authmd512crypt.o decodenetnum.o systime.o msyslog.o syssignal.o \
	findconfig.o

$(LIBNAME).a:	$(OBJS)
	ar rv $@ $?
	rm -f $?
	$(RANLIB) $@

lintlib:	llib-l$(LIBNAME).ln

llib-l$(LIBNAME).ln:	$(SOURCE)
	lint -C$(LIBNAME) $(INCL) $(CLOCKDEFS) $(AUTHDEFS) $(LIBDEFS) $(SOURCE) >lintlib.errs

lint:
	lint -u $(DEFS) $(INCL) $(CLOCKDEFS) $(AUTHDEFS) $(LIBDEFS) $(SOURCE) >lint.errs

depend:
	mkdep $(CFLAGS) $(SOURCE)

clean:
	rm -f $(LIBNAME).a *.o *.out *.ln make.log Makefile.bak \
		lintlib.errs lint.errs

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