--- res_bonjour-1.0rc1/Makefile.orig 2006-01-13 18:07:18.000000000 +0100 +++ res_bonjour-1.0rc1/Makefile 2006-03-05 02:57:11.000000000 +0100 @@ -9,7 +9,7 @@ NAME=res_bonjour CONF=bonjour.conf -CFLAGS=$(shell ./cflags.sh) +CFLAGS+=$(shell ./cflags.sh) LIBS=-ldns_sd RES=$(shell if [ -f /usr/include/asterisk/channel.h ]; then echo "$(NAME).so"; fi) @@ -29,13 +29,9 @@ clean: rm -f $(NAME).o $(NAME).so -install: all - if ! [ -f /etc/asterisk/$(CONF) ]; then \ - install -m 644 $(CONF).sample /etc/asterisk/$(CONF) ; \ - fi - if [ -f $(NAME).so ]; then \ - install -m 755 $(NAME).so $(MODULES_DIR) ; \ - fi +install: + install -D -m 644 $(CONF).sample $(DESTDIR)/etc/asterisk/$(CONF) + install -D -m 755 $(NAME).so $(DESTDIR)$(MODULES_DIR)/$(NAME).so reload: install asterisk -rx "unload ${RES}"