include nstreams.tmpl

all : nstreams

nstreams : 
	cd src && ${MAKE}
	
clean : 
	cd src && ${MAKE} clean


install : all
	$(INSTALL) -m 0755 -d ${prefix}/bin
	$(INSTALL) -m 0755 src/nstreams ${prefix}/bin  
	$(INSTALL) -m 0755 -d ${prefix}/man
	$(INSTALL) -m 0755 -d ${prefix}/man/man1
	$(INSTALL) -m 0444 docs/nstreams.1 ${prefix}/man/man1/
	if [ -f ${prefix}/etc/nstreams-services ]; then mv ${prefix}/etc/nstreams-services ${prefix}/etc/nstreams-services.old;fi
	$(INSTALL) -m 0644 docs/nstreams-services ${prefix}/etc/nstreams-services
	$(INSTALL) -m 0644 docs/nstreams-networks ${prefix}/etc/nstreams-networks.sample
	
distclean : clean
	rm -f includes/config.h config.cache config.status config.log nstreams.tmpl
	
