ver=1.0
CFLAGS = -g -Wall -W -O2
LDFLAGS = -g

# Can't get this program to compile because of missing in_addr_t? 
# Uncomment the next line.
# CPPFLAGS = -Din_addr_t=uint32_t

OBJS = buffer.o util.o net.o nc.o fd.o list.o

pjbnc: $(OBJS)
	$(LINK.c) -o pjbnc $(OBJS)

clean:
	$(RM) -f $(OBJS)

distclean: 
	$(RM) -rf ./*.o ./*~ pjbnc core pjbnc-$(ver) pjbnc-$(ver).tar.bz2

dist: distclean
	mkdir pjbnc-$(ver)
	tar -cf - --exclude pjbnc-$(ver) . | tar -C pjbnc-$(ver) -xf -
	tar -cf pjbnc-$(ver).tar pjbnc-$(ver)
	$(RM) -rf pjbnc-$(ver)
	bzip2 -9 pjbnc-$(ver).tar


