|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
--- Makefile.org 2014-03-04 18:18:25.000000000 -0800
|
|
|
|
|
+++ Makefile 2014-03-04 18:27:48.000000000 -0800
|
|
|
|
|
@@ -21,20 +21,24 @@
|
|
|
|
|
--- Makefile.org 2014-03-10 23:12:11.000000000 -0700
|
|
|
|
|
+++ Makefile 2014-03-10 23:33:10.000000000 -0700
|
|
|
|
|
@@ -22,20 +22,24 @@
|
|
|
|
|
CFLAGS += -DUSE_SYS_DYN_MEM
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
@ -22,10 +22,8 @@ |
|
|
|
|
+
|
|
|
|
|
+LIBDIR = $(PREFIX)/lib
|
|
|
|
|
# on x86_64, we might have /usr/lib64 directory instead of /usr/lib
|
|
|
|
|
-MACHINE := $(shell uname -m)
|
|
|
|
|
-ifeq ($(MACHINE), x86_64)
|
|
|
|
|
+UNAME_M := $(shell uname -m)
|
|
|
|
|
+ifeq ($(UNAME_M),x86_64)
|
|
|
|
|
UNAME_M := $(shell uname -m)
|
|
|
|
|
ifeq ($(UNAME_M), x86_64)
|
|
|
|
|
ifeq (,$(wildcard $(LIBDIR)))
|
|
|
|
|
-LIBDIR = $(DESTDIR)$(PREFIX)/lib64
|
|
|
|
|
-else
|
|
|
|
@ -34,18 +32,18 @@ |
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
@@ -136,21 +140,10 @@
|
|
|
|
|
LIBOBJ += $(LIBOBJ_ARM) $(LIBOBJ_ARM64) $(LIBOBJ_MIPS) $(LIBOBJ_PPC) $(LIBOBJ_X86)
|
|
|
|
|
@@ -138,7 +142,6 @@
|
|
|
|
|
LIBOBJ += MCInst.o
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
-UNAME_S := $(shell uname -s)
|
|
|
|
|
-PKGCFCGDIR = $(LIBDIR)/pkgconfig
|
|
|
|
|
-
|
|
|
|
|
PKGCFCGDIR = $(LIBDIR)/pkgconfig
|
|
|
|
|
|
|
|
|
|
# OSX?
|
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
|
EXT = dylib
|
|
|
|
|
AR_EXT = a
|
|
|
|
|
@@ -149,13 +152,6 @@
|
|
|
|
|
# remove string check because OSX kernel complains about missing symbols
|
|
|
|
|
CFLAGS += -D_FORTIFY_SOURCE=0
|
|
|
|
|
endif
|
|
|
|
|
-# By default, suppose that Brew is installed & use Brew path for pkgconfig file
|
|
|
|
|
-PKGCFCGDIR = /usr/local/lib/pkgconfig
|
|
|
|
|
-# is Macport installed instead?
|
|
|
|
@ -56,9 +54,9 @@ |
|
|
|
|
else
|
|
|
|
|
# Cygwin?
|
|
|
|
|
IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
|
|
|
|
|
@@ -228,25 +221,25 @@
|
|
|
|
|
echo 'Description: Capstone disassembler engine' >> $(PKGCFGF)
|
|
|
|
|
echo 'Version: $(VERSION)' >> $(PKGCFGF)
|
|
|
|
|
@@ -237,25 +233,25 @@
|
|
|
|
|
echo 'Version: $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA)' >> $(PKGCFGF)
|
|
|
|
|
endif
|
|
|
|
|
echo 'libdir=$(LIBDIR)' >> $(PKGCFGF)
|
|
|
|
|
- echo 'includedir=$(PREFIX)/include/capstone' >> $(PKGCFGF)
|
|
|
|
|
+ echo 'includedir=$(INCDIR)/capstone' >> $(PKGCFGF)
|
|
|
|
@ -79,8 +77,8 @@ |
|
|
|
|
+ $(INSTALL_DATA) lib$(LIBNAME).$(AR_EXT) $(DESTDIR)$(LIBDIR)
|
|
|
|
|
+ mkdir -p $(DESTDIR)$(INCDIR)/$(LIBNAME)
|
|
|
|
|
+ $(INSTALL_DATA) include/*.h $(DESTDIR)$(INCDIR)/$(LIBNAME)
|
|
|
|
|
+ mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
|
|
|
|
|
+ $(INSTALL_DATA) $(PKGCFGF) $(DESTDIR)$(LIBDIR)/pkgconfig/
|
|
|
|
|
+ mkdir -p $(DESTDIR)$(PKGCFCGDIR)
|
|
|
|
|
+ $(INSTALL_DATA) $(PKGCFGF) $(DESTDIR)$(PKGCFCGDIR)/
|
|
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
|
- rm -rf $(INCDIR)/$(LIBNAME)
|
|
|
|
@ -90,7 +88,7 @@ |
|
|
|
|
+ rm -rf $(DESTDIR)$(INCDIR)/$(LIBNAME)
|
|
|
|
|
+ rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).$(EXT)
|
|
|
|
|
+ rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).$(AR_EXT)
|
|
|
|
|
+ rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/$(LIBNAME).pc
|
|
|
|
|
+ rm -f $(DESTDIR)$(PKGCFCGDIR)/$(LIBNAME).pc
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
rm -f $(LIBOBJ) lib$(LIBNAME).*
|
|
|
|
|