# MINIX-PC ACK compiler.
CC	= cc
LD	= cc -i
O	= s
L	= ack

# MINIX-PC BCC compiler from Bruce Evans.
#CC	= bcc
#LD	= bcc -i
#O	= o
#L	= bcc

INC	= -I../../include
LIB	= ../../lib/$(L)


CFLAGS	= -D_MINIX -D_POSIX_SOURCE $(INC)

LIBS	= $(LIB)/libinet.a $(LIB)/libtnet.a

OBJS	= main.$(O) getinfo.$(O) debug.$(O) skip.$(O) \
		list.$(O) subr.$(O) commands.$(O)


nslookup:	$(OBJS)
		$(LD) -o nslookup $(OBJS) $(LIBS)

main.$(O):	main.c res.h longnames.h pathnames.h
		$(CC) -c $(CFLAGS) main.c

getinfo.$(O):	getinfo.c res.h longnames.h
		$(CC) -c $(CFLAGS) getinfo.c

debug.$(O):	debug.c res.h longnames.h
		$(CC) -c $(CFLAGS) debug.c

send.$(O):	send.c longnames.h
		$(CC) -c $(CFLAGS) send.c

skip.$(O):	skip.c longnames.h
		$(CC) -c $(CFLAGS) skip.c

list.$(O):	list.c res.h longnames.h
		$(CC) -c $(CFLAGS) list.c

subr.$(O):	subr.c res.h longnames.h
		$(CC) -c $(CFLAGS) subr.c

commands.$(O):	commands.c res.h longnames.h
		$(CC) -c $(CFLAGS) commands.c

# End of Makefile.
