NGINX_SOURCE_DIR = nginx ifeq (, $(shell which bear)) MUNIN_BEAR=make else MUNIN_BEAR=bear -- endif ifneq ($(MUNINN_NGINX_DEBUG),) MUNINN_NGINX_DEBUG="--with-debug" endif .PHONY: all clean all: nginx/objs/nginx nginx/objs/Makefile: config Makefile make clean cd $(NGINX_SOURCE_DIR) && \ ./auto/configure \ $(MUNINN_NGINX_DEBUG) \ --with-http_ssl_module \ --with-compat \ --add-module=$(shell pwd) nginx/objs/nginx: nginx/objs/Makefile muninn_core.c muninn_daemon.c muninn.h $(MUNIN_BEAR) make -C $(NGINX_SOURCE_DIR) clean: -make -C $(NGINX_SOURCE_DIR) clean