# # $Id: Makefile,v 1.6 2006/11/18 09:20:55 maxim Exp $ # include src/Rules.make compile: cd src/common && $(MAKE) cd src/httpd && $(MAKE) clean: cd src/common && $(MAKE) clean cd src/httpd && $(MAKE) clean rm -f *~ src/*~ install: compile test -d $(ROOT)/0W-httpd || (mkdir $(ROOT)/0W-httpd) install -d $(ROOT)/0W-httpd/data $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/pids install -m 0755 bin/update-countries.sh src/httpd/convert-ranges src/httpd/convert-geoip $(ROOT)/bin install -m 6755 -o $(OWNER) -g $(GROUP) src/httpd/0W-httpd $(ROOT)/sbin test -d $(ROOT)/etc/0W-httpd || (mkdir $(ROOT)/etc/0W-httpd && cd conf/ && \ cp countries* $(ROOT)/etc/0W-httpd/ && \ cp httpd.conf $(ROOT)/etc/0W-httpd/httpd.conf.sample ) chown -R $(OWNER):$(GROUP) $(ROOT)/sbin/0W-httpd $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/data $(ROOT)/0W-httpd/pids @echo @echo "Installed, run as root: $(ROOT)/bin/0W-httpd [-h]" upgrade: install $(ROOT)/bin/0W-httpd -t killall 0W-httpd && sleep 1 || true $(ROOT)/bin/0W-httpd -w uninstall: @test -d $(ROOT) || (echo "0W-httpd is not installed in $(ROOT)" && false) @echo @echo "This will remove directory $(ROOT)!" @echo "Press to confirm, to abort" @read answer killall 0W-httpd || true rm -rf $(ROOT)