RT478: Add uninstall make target
[openssl.git] / tools / Makefile
index c0770b3..19950d1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# SSLeay/tools/Makefile
+# OpenSSL/tools/Makefile
 #
 
 DIR=   tools
@@ -7,12 +7,6 @@ TOP=   ..
 CC=    cc
 INCLUDES= -I$(TOP) -I../../include
 CFLAG=-g
-INSTALL_PREFIX=
-OPENSSLDIR=     /usr/local/ssl
-INSTALLTOP=/usr/local/ssl
-MAKE=          make
-MAKEDEPPROG=   makedepend
-MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 MAKEFILE=      Makefile
 
 CFLAGS= $(INCLUDES) $(CFLAG)
@@ -25,6 +19,7 @@ MISC_APPS= c_hash c_info c_issuer c_name
 all:
 
 install:
+       @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @for i in $(APPS) ; \
        do  \
        (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
@@ -38,6 +33,18 @@ install:
        mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
        done;
 
+uninstall:
+       @for i in $(APPS) ; \
+       do  \
+               echo $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
+               $(RM) $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \
+       done;
+       @for i in $(MISC_APPS) ; \
+       do  \
+               echo $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
+               $(RM) $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \
+       done;
+
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO