Index: pbx/Makefile =================================================================== --- pbx/Makefile (revision 7915) +++ pbx/Makefile (working copy) @@ -74,6 +74,8 @@ install: all for x in $(PBX_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done +uninstall: + depend: .depend .depend: Index: channels/Makefile =================================================================== --- channels/Makefile (revision 7915) +++ channels/Makefile (working copy) @@ -238,6 +238,8 @@ for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done if ! [ -f chan_iax.so ]; then rm -f $(DESTDIR)$(MODULES_DIR)/chan_iax.so ; fi +uninstall: + depend: .depend .depend: @@ -245,4 +247,3 @@ env: env - Index: apps/Makefile =================================================================== --- apps/Makefile (revision 7915) +++ apps/Makefile (working copy) @@ -95,6 +95,8 @@ rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so +uninstall: + app_curl.so: app_curl.o $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS) Index: stdtime/Makefile =================================================================== --- stdtime/Makefile (revision 7915) +++ stdtime/Makefile (working copy) @@ -8,6 +8,8 @@ install: +uninstall: + clean: rm -f libtime.a *.o test .depend Index: Makefile =================================================================== --- Makefile (revision 7915) +++ Makefile (working copy) @@ -907,3 +907,37 @@ if cmp -s .cleancount .lastclean ; then echo ; else \ $(MAKE) clean; cp -f .cleancount .lastclean;\ fi + +_uninstall: + rm -f $(DESTDIR)$(MODULES_DIR)/* + rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk* + rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey + rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport + rm -rf $(DESTDIR)$(ASTHEADERDIR) + rm -rf $(DESTDIR)$(ASTVARLIBDIR)/sounds + rm -rf $(DESTDIR)$(ASTVARLIBDIR)/firmware + rm -rf $(DESTDIR)$(ASTMANDIR)/man8 + for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done + +uninstall: _uninstall + @echo " +--------- Asterisk Uninstall Complete -----+" + @echo " + Asterisk binaries, sounds, man pages, +" + @echo " + headers, modules, and firmware builds, +" + @echo " + have all been uninstalled. +" + @echo " + +" + @echo " + To remove ALL traces of Asterisk, +" + @echo " + including configuration, spool +" + @echo " + directories, and logs, run the following +" + @echo " + command: +" + @echo " + +" + @echo " + $(MAKE) uninstall-all +" + @echo " +-------------------------------------------+" + + +uninstall-all: _uninstall + rm -rf $(DESTDIR)$(ASTLIBDIR) + rm -rf $(DESTDIR)$(ASTVARLIBDIR) + rm -rf $(DESTDIR)$(ASTSPOOLDIR) + rm -rf $(DESTDIR)$(ASTETCDIR) + rm -rf $(DESTDIR)$(ASTLOGDIR) + Index: agi/Makefile =================================================================== --- agi/Makefile (revision 7915) +++ agi/Makefile (working copy) @@ -30,6 +30,9 @@ mkdir -p $(DESTDIR)$(AGI_DIR) for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done +uninstall: + for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done + eagi-test: eagi-test.o $(CC) $(CFLAGS) -o eagi-test eagi-test.o $(LIBS) Index: funcs/Makefile =================================================================== --- funcs/Makefile (revision 7915) +++ funcs/Makefile (working copy) @@ -78,6 +78,8 @@ install: all for x in $(FUNCS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done +uninstall: + ifneq ($(wildcard .depend),) include .depend endif Index: res/Makefile =================================================================== --- res/Makefile (revision 7915) +++ res/Makefile (working copy) @@ -88,6 +88,8 @@ echo "*** it if you want to use MusicOnHold ***";\ fi +uninstall: + res_crypto.so: res_crypto.o $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS) Index: codecs/Makefile =================================================================== --- codecs/Makefile (revision 7915) +++ codecs/Makefile (working copy) @@ -138,6 +138,8 @@ install: all for x in $(CODECS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done +uninstall: + depend: .depend .depend: Index: utils/Makefile =================================================================== --- utils/Makefile (revision 7915) +++ utils/Makefile (working copy) @@ -44,6 +44,9 @@ fi; \ done +uninstall: + for x in $(TARGET); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done + clean: rm -f *.o astman smsq stereorize streamplayer check_expr .depend rm -f ast_expr2.o ast_expr2f.o Index: cdr/Makefile =================================================================== --- cdr/Makefile (revision 7915) +++ cdr/Makefile (working copy) @@ -112,6 +112,8 @@ install: all for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done +uninstall: + clean: rm -f *.so *.o .depend Index: formats/Makefile =================================================================== --- formats/Makefile (revision 7915) +++ formats/Makefile (working copy) @@ -62,6 +62,8 @@ install: all for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done +uninstall: + depend: .depend .depend: