PACKAGE	= nonstop-read-1.0.5
CC	= gcc
CFLAGS	= -g -Wall -Wstrict-prototypes $(CONFIG_DEFINES) $(LIBRARY)

#LIBRARY=
LIBRARY= -lnsl -lsocket	# Solaris

CONFIG_DEFINES = -DHAVE_POLL


EXE	= normal_read alarmed_read selected_read polled_read nonblock_read plural_watch sigio_driven

all: $(EXE)

clean:
	rm -f $(EXE) a.out *.o *~

tar:
	sudo -u nobody mkdir /tmp/$(PACKAGE)
	sudo -u nobody cp *.c *.html Makefile lazy-daemon /tmp/$(PACKAGE)
	(cd /tmp; tar cvf - $(PACKAGE)) | gzip -c > $(PACKAGE).tar.gz
	sudo -u nobody rm -r /tmp/$(PACKAGE)
