Allows for user to uninstall asterisk binaries
[asterisk/asterisk.git] / utils / Makefile
old mode 100755 (executable)
new mode 100644 (file)
index 30a2a1f..cc90f35
 #
 CFLAGS+=-DNO_AST_MM
 
-ifeq ($(findstring BSD,${OSARCH}),BSD)
-  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
-endif
-
 TARGET=stereorize streamplayer
 
 ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/popt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h),)
@@ -32,6 +28,7 @@ endif
 
 ifeq (${OSARCH},SunOS)
   SOL=../strcompat.o
+  SOLLIBS=-lsocket -lnsl
 endif
 
 all: depend $(TARGET)
@@ -43,8 +40,11 @@ install:
                fi; \
        done 
 
+uninstall:
+       for x in $(TARGET); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done
+
 clean:
-       rm -f *.o astman smsq stereorize check_expr .depend
+       rm -f *.o astman smsq stereorize streamplayer check_expr .depend
        rm -f ast_expr2.o ast_expr2f.o
 
 astman: astman.o ../md5.o
@@ -66,7 +66,7 @@ smsq: smsq.o
        $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt
 
 streamplayer: streamplayer.o
-       $(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o
+       $(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o ${SOLLIBS}
 
 ifneq ($(wildcard .depend),)
   include .depend