Add a new API call for creating detached threads. Then, go replace all of the
[asterisk/asterisk.git] / Makefile
index 7767780..aa7de5a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,7 @@ export AGI_DIR
 export ASTCONFPATH
 export NOISY_BUILD
 export MENUSELECT_CFLAGS
+export AST_DEVMODE
 export CC
 export CXX
 export AR
@@ -63,6 +64,8 @@ export CURSES_DIR
 export NCURSES_DIR
 export TERMCAP_DIR
 export TINFO_DIR
+export GTK2_LIB
+export GTK2_INCLUDE
 
 # even though we could use '-include makeopts' here, use a wildcard
 # lookup anyway, so that make won't try to build makeopts if it doesn't
@@ -189,7 +192,7 @@ ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declar
 ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused
+  ASTCFLAGS+=-Werror -Wunused -Wundef
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)
@@ -284,7 +287,8 @@ _all: cleantest $(SUBDIRS)
 
 makeopts: configure
        @echo "****"
-       @echo "**** The configure script must be executed before running '$(MAKE)'."
+       @echo "**** The configure script must be executed before running '$(MAKE)'." 
+       @echo "****               Please run \"./configure\"."
        @echo "****"
        @exit 1
 
@@ -423,7 +427,7 @@ bininstall: _all
        $(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
        $(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
        if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
-               cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
+               cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
                chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
        fi
        $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
@@ -540,6 +544,8 @@ samples: adsi
                echo "" ; \
                echo ";[options]" ; \
                echo ";internal_timing = yes" ; \
+               echo ";systemname = my_system_name ; prefix uniqueid with a system name for global uniqueness issues" ; \
+               echo ";autosystemname = yes ; automatically set systemname to hostname - uses 'localhost' on failure, or systemname if set" ; \
                echo "; Changing the following lines may compromise your security." ; \
                echo ";[files]" ; \
                echo ";astctlpermissions = 0660" ; \
@@ -672,14 +678,42 @@ uninstall-all: _uninstall
 
 menuconfig: menuselect
 
+gmenuconfig: gmenuselect
+
 menuselect: menuselect/menuselect menuselect-tree
        -@menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
 
+gmenuselect: menuselect/gmenuselect menuselect-tree
+       -@menuselect/gmenuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
+
 menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
        @CC="$(HOST_CC)" LD="" AR="" RANLIB="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
 
+menuselect/gmenuselect: makeopts menuselect/menuselect.c menuselect/menuselect_gtk.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
+       @CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" $(MAKE) -C menuselect _gmenuselect CONFIGURE_SILENT="--silent"
+
 menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml
        @echo "Generating input for menuselect ..."
        @build_tools/prep_moduledeps > $@
 
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS)
+asterisk.pdf: doc/asterisk.pdf
+
+doc/asterisk.pdf: $(wildcard doc/*.tex)
+ifeq ($(findstring rubber,$(RUBBER)),)
+       @echo "**********************************************"
+       @echo "** You must install the \"rubber\" tool      ***"
+       @echo "** to generate the Asterisk reference PDF. ***"
+       @echo "**********************************************"
+else
+       @echo "**********************************************"
+       @echo "** The Asterisk reference PDF will now be  ***"
+       @echo "** generated.  When complete, it will be   ***"
+       @echo "** located at doc/asterisk.pdf.            ***"  
+       @echo "**********************************************"
+       @cp doc/asterisk.tex doc/asterisk.tex.orig
+       @sed -i -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' doc/asterisk.tex
+       @cd doc && $(RUBBER) --pdf asterisk.tex
+       @mv doc/asterisk.tex.orig doc/asterisk.tex
+endif
+
+.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) menuselect.makeopts