|
|
@ -34,14 +34,21 @@ UNAME_M := $(shell uname -m) |
|
|
|
ifeq ($(UNAME_M), x86_64) |
|
|
|
ifeq ($(UNAME_M), x86_64) |
|
|
|
ifeq (,$(wildcard $(LIBDIR))) |
|
|
|
ifeq (,$(wildcard $(LIBDIR))) |
|
|
|
LIBDIR = $(DESTDIR)$(PREFIX)/lib64
|
|
|
|
LIBDIR = $(DESTDIR)$(PREFIX)/lib64
|
|
|
|
else |
|
|
|
|
|
|
|
LIBDIR = $(DESTDIR)$(PREFIX)/lib
|
|
|
|
|
|
|
|
endif |
|
|
|
endif |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LIBDATADIR = $(LIBDIR)
|
|
|
|
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
|
|
|
|
ifeq ($(UNAME_S), FreeBSD) |
|
|
|
|
|
|
|
LIBDATADIR = $(DESTDIR)$(PREFIX)/libdata
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
ifeq ($(UNAME_S), DragonFly) |
|
|
|
|
|
|
|
LIBDATADIR = $(DESTDIR)$(PREFIX)/libdata
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
INSTALL_BIN ?= install
|
|
|
|
INSTALL_BIN ?= install
|
|
|
|
INSTALL_DATA ?= $(INSTALL_BIN) -m0644
|
|
|
|
INSTALL_DATA ?= $(INSTALL_BIN) -m0644
|
|
|
|
INSTALL_LIBRARY ?= $(INSTALL_BIN) -m0755
|
|
|
|
INSTALL_LIB ?= $(INSTALL_BIN) -m0755
|
|
|
|
|
|
|
|
|
|
|
|
LIBNAME = capstone
|
|
|
|
LIBNAME = capstone
|
|
|
|
|
|
|
|
|
|
|
@ -174,7 +181,7 @@ LIBOBJ += MCInst.o |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
PKGCFCGDIR = $(LIBDIR)/pkgconfig
|
|
|
|
PKGCFCGDIR = $(LIBDATADIR)/pkgconfig
|
|
|
|
VERSION_EXT =
|
|
|
|
VERSION_EXT =
|
|
|
|
|
|
|
|
|
|
|
|
# OSX?
|
|
|
|
# OSX?
|
|
|
@ -284,7 +291,7 @@ install: $(PKGCFGF) $(ARCHIVE) $(LIBRARY) |
|
|
|
mkdir -p $(LIBDIR)
|
|
|
|
mkdir -p $(LIBDIR)
|
|
|
|
# remove potential broken old libs
|
|
|
|
# remove potential broken old libs
|
|
|
|
rm -f $(LIBDIR)/lib$(LIBNAME).*
|
|
|
|
rm -f $(LIBDIR)/lib$(LIBNAME).*
|
|
|
|
$(INSTALL_LIBRARY) lib$(LIBNAME).$(EXT) $(LIBDIR)
|
|
|
|
$(INSTALL_LIB) lib$(LIBNAME).$(EXT) $(LIBDIR)
|
|
|
|
ifneq ($(VERSION_EXT),) |
|
|
|
ifneq ($(VERSION_EXT),) |
|
|
|
ln -s $(LIBDIR)/lib$(LIBNAME).$(EXT) $(LIBDIR)/lib$(LIBNAME).$(VERSION_EXT)
|
|
|
|
ln -s $(LIBDIR)/lib$(LIBNAME).$(EXT) $(LIBDIR)/lib$(LIBNAME).$(VERSION_EXT)
|
|
|
|
endif |
|
|
|
endif |
|
|
|