# Make file for xntp/authstuff directory
#
# Things you might want to change.  Pass them in on the command line:
# ROOT - should point to the root where the commands will be installed
#        (e.g. /deliver/INETSVCS/indnetwk)

ROOT=

PRODUCTS=/usr/examples/xntp/authspeed \
	/usr/newconfig/etc/ntp.keys

# Defaults file containing the shell, compiler options, etc
BUILDRULES=/source/INETSVCS/$(LOGNAME)/config/defaults

include ${BUILDRULES}

INCLUDES= -I../include -I/usr/include

AUTHOPT=-DREFCLOCK -DNO_SIGNED_CHAR_DECL -DDEBUG -DHPUXDEBUG \
	-DHPUX=9 -DNOKMEM -DHAVE_UNISTD_H

CCFLAGS=$(INCLUDES) $(AUTHOPT) $(CFLAGS)

AUTHOBJ=ver.o authspeed.o

LDLIBRARIES=    ../lib/libntp.a -lBSD

#Install database name
INSTALLDB=/source/INETSVCS/$(LOGNAME)/config/installdb

#Script called to parse the install deliverable
INSTALLSCPT=/source/INETSVCS/$(LOGNAME)/config/install_script

default: all

all: clean build install

clean:
	$(RM) -f $(AUTHOBJ)
	$(RM) -f authspeed
	
install:
	for file in $(PRODUCTS) ; do \
		$(INSTALLSCPT) $$file $(INSTALLDB) ;  \
	done

build: authspeed

.c.o:
	$(CC) $(CCFLAGS) -c $<

ver.o:
	$(SHELL) newvers.sh
	$(CC) $(CCFLAGS) -c ver.c

authspeed: $(AUTHOBJ)
	$(CC) $(LDFLAGS) -o $@ $(AUTHOBJ) $(LDLIBRARIES)

