Muninn/Makefile

41 lines
685 B
Makefile
Raw Normal View History

NGINX_SOURCE_DIR = nginx
NGINX_BUILD_DIR = nginx/objs
ifeq (, $(shell which bear))
MUNIN_BEAR=make
else
MUNIN_BEAR=bear --
endif
ifeq ($(shell uname), Darwin)
NGX_MODEXT = .dylib
else
NGX_MODEXT = .so
endif
NGX_MODULE = libmuninn$(NGX_MODEXT)
ifneq ($(MUNINN_NGINX_DEBUG),)
MUNINN_NGINX_DEBUG="--with-debug"
endif
CURDIR = $(.CURDIR)
.PHONY: all clean build
all: nginx/objs/nginx
nginx/objs/Makefile:
cd $(NGINX_SOURCE_DIR) && \
./auto/configure \
$(MUNINN_NGINX_DEBUG) \
--with-http_ssl_module \
--with-compat \
--add-module=$(.CURDIR)
nginx/objs/nginx: nginx/objs/Makefile
$(MUNIN_BEAR) make -C $(NGINX_SOURCE_DIR)
clean:
make -C $(NGINX_SOURCE_DIR) clean