cstool: compile/clean/install/uninstall from Makefile
diff --git a/Makefile b/Makefile
index e709d50..c7505c1 100644
--- a/Makefile
+++ b/Makefile
@@ -74,6 +74,7 @@
# Or better, pass 'LIBDIRARCH=lib64' to 'make install/uninstall' via 'make.sh'.
#LIBDIRARCH ?= lib64
LIBDIR ?= $(PREFIX)/$(LIBDIRARCH)
+BINDIR = $(PREFIX)/bin
LIBDATADIR ?= $(LIBDIR)
@@ -355,6 +356,7 @@
all: $(LIBRARY) $(ARCHIVE) $(PKGCFGF)
ifeq (,$(findstring yes,$(CAPSTONE_BUILD_CORE_ONLY)))
+ @V=$(V) $(MAKE) -C cstool
ifndef BUILDDIR
cd tests && $(MAKE)
else
@@ -414,16 +416,19 @@
$(INSTALL_DATA) include/capstone/*.h $(DESTDIR)/$(INCDIR)/$(LIBNAME)
mkdir -p $(DESTDIR)/$(PKGCFGDIR)
$(INSTALL_DATA) $(PKGCFGF) $(DESTDIR)/$(PKGCFGDIR)
+ $(INSTALL_LIB) cstool/cstool $(DESTDIR)/$(BINDIR)
uninstall:
rm -rf $(DESTDIR)/$(INCDIR)/$(LIBNAME)
rm -f $(DESTDIR)/$(LIBDIR)/lib$(LIBNAME).*
rm -f $(DESTDIR)/$(PKGCFGDIR)/$(LIBNAME).pc
+ rm -f $(DESTDIR)/$(BINDIR)/cstool
clean:
rm -f $(LIBOBJ)
rm -f $(BLDIR)/lib$(LIBNAME).* $(BLDIR)/$(LIBNAME).*
rm -f $(PKGCFGF)
+ $(MAKE) -C cstool clean
ifeq (,$(findstring yes,$(CAPSTONE_BUILD_CORE_ONLY)))
cd tests && $(MAKE) clean