Index: tools/zapscan.c =================================================================== --- tools/zapscan.c (revision 140) +++ tools/zapscan.c (working copy) @@ -29,7 +29,12 @@ #include #include #include + +#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) +#include +#else #include +#endif int main(int argc, char *argv[]) { Index: tools/Makefile =================================================================== --- tools/Makefile (revision 140) +++ tools/Makefile (working copy) @@ -10,12 +10,21 @@ # This program is free software, distributed under the terms of # the GNU General Public License # + +OSARCH=FreeBSD + all: zapscan.bin +ifeq ($(OSARCH),FreeBSD) + ASTFLAGS=-I/usr/local/include +endif zapscan.bin: zapscan.o $(CC) -o zapscan.bin zapscan.o +zapscan.o: + $(CC) $(ASTFLAGS) -c -o zapscan.o zapscan.c + install: mkdir -p $(DESTDIR)/sbin $(INSTALL) -m 755 zapscan $(DESTDIR)/sbin Index: Makefile =================================================================== --- Makefile (revision 140) +++ Makefile (working copy) @@ -35,10 +35,6 @@ ifeq ($(ASTVARLIB),) ASTVARLIB=/var/lib/asterisk endif -ASTETCDIR?=$(shell cat $(DESTDIR)/etc/asterisk/asterisk.conf 2>/dev/null | grep -v ^\; | grep astetcdir | cut -f 3 -d ' ') -ifeq ($(ASTETCDIR),) - ASTETCDIR=/etc/asterisk -endif HTTPDIR=$(DESTDIR)$(ASTVARLIB)/static-http CONFIGDIR=$(HTTPDIR)/config ASTETCDIR?=$(shell cat $(DESTDIR)/etc/asterisk/asterisk.conf 2>/dev/null | grep -v ^\; | grep astetcdir | cut -f 3 -d ' ') @@ -66,7 +62,7 @@ @echo " + Asterisk-GUI has successfully been built, +" @echo " + and can be installed by running: +" @echo " + +" - @echo " + make install +" + @echo " + $(MAKE) install +" @echo " +-------------------------------------------+" _all: @@ -81,7 +77,7 @@ echo "OK" ; \ else \ echo "FAILED"; \ - echo " -- Please run 'make samples' in *Asterisk* or " ; \ + echo " -- Please run '$(MAKE) samples' in *Asterisk* or " ; \ echo " -- create your own $(ASTETCDIR)/http.conf" ; \ exit 1; \ fi @@ -90,7 +86,7 @@ echo "OK" ; \ else \ echo "FAILED"; \ - echo " -- Please run 'make samples' in *Asterisk* or " ; \ + echo " -- Please run '$(MAKE) samples' in *Asterisk* or " ; \ echo " -- create your own $(ASTETCDIR)/manager.conf" ; \ exit 1; \ fi