
PREFIX=/usr/local/sbin
SUBDIR=in.dhcp in.dns in.mvp in.jabberd in.www

# Available CFLAGS:
# -DPACKETDUMP - force in.dns/in.dhcp to dump in/out packets to /tmp
#                for debugging
# -DLOGGING    - debug logging to the syslog for all apps
# -DONELOG     - cause in.dhcp to log a single line for each response
# -DCGI        - enable CGI support for in.www
# -DNORELATIVE - relative path protection for in.www
# -DUPDATEPS   - in.jabberd will update it's procname (for Linux only)
#                with the name of the logged in user
export CFLAGS	:=	-DONELOG -DNORELATIVE -DCGI -DUPDATEPS 

all:
	@mkdir -p bin
	@for i in $(SUBDIR); do cd $$i; if $(MAKE); then cd ..; else exit 1; fi; done;	
	@echo ""
	@echo "Now, run 'make install' as root."

clean:
	rm -rf bin
	@for i in $(SUBDIR); do cd $$i; if $(MAKE) clean; then cd ..; else exit 1; fi; done;	

install:
	cp -f bin/* $(PREFIX)
	@echo ""
	@echo "Make sure you update your inetd/xinetd.conf."

uninstall:
	for i in $(SUBDIR); do rm -rf $(PREFIX)/$$i; done
