SHELL = /bin/sh
MAKE = make
CC = cc

#LIBS = -ll -lnsl -lsocket	# SOLARIS NEEDS THIS
LIBS=

# SOLARIS
#CFLAGS=-DBZERO -O
# FLAGS REQUIRED FOR PORTING
# SUNOS 4.1.4, HPUX 10.0, and LINUX NEED NOTHING DEFINED
# EXCEPT MAYBE THE OPTIMIZER
# CFLAGS=-O
# FREEBSD NEEDS SPECIAL ZOMBIE HANDLING
# CFLAGS=-DZOMBIE -O
# ULTRIX NEEDS SPECIAL ZOMBIE AND SYSLOG HANDLING
# Ultrix port contributed by Gunnar Helliesen <gunnar@bitcon.no>
CFLAGS=-DZOMBIE -DSYSLOG -D&BBOSTYPE -O

all: bb bbd bbnet touchtime dumphostsvc getipaddr

bb: bb.o bb.h
	${CC} ${CFLAGS} -o $@ bb.o ${LIBS}

bbd: dohostsvc.o utils.o bbd.o bb.h
	${CC} ${CFLAGS} -o $@ bbd.o dohostsvc.o utils.o ${LIBS}

bbnet: bbnet.o bb.h
	${CC} ${CFLAGS} -o $@ bbnet.o ${LIBS}

touchtime: touchtime.o bb.h
	${CC} ${CFLAGS} -o $@ touchtime.o ${LIBS}

dumphostsvc: dohostsvc.o utils.o dumphostsvc.o bb.h
	${CC} ${CFLAGS} -o $@ dumphostsvc.o dohostsvc.o utils.o ${LIBS}

getipaddr: utils.o getipaddr.o bb.h
	${CC} ${CFLAGS} -o $@ getipaddr.o utils.o ${LIBS}

install:
	rm -f *.o
	mv bb bbd bbnet touchtime dumphostsvc getipaddr ../bin

clean:	
	rm -f *.o bb bbd bbnet touchtime dumphostsvc getipaddr
