Skip to content

Commit

Permalink
Merge branch 'next_check' of https://github.com/akihikodaki/capstone
Browse files Browse the repository at this point in the history
…into akihikodaki-next_check
  • Loading branch information
aquynh committed Sep 12, 2016
2 parents c871c05 + ec40753 commit 03ff67a
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,7 @@ ifndef BUILDDIR
else
cd tests && $(MAKE) BUILDDIR=$(BLDIR)
endif
ifeq ($(CAPSTONE_SHARED),yes)
$(INSTALL_DATA) $(LIBRARY) $(BLDIR)/tests/lib$(LIBNAME).$(VERSION_EXT)
endif
$(call install-library,$(BLDIR)/tests/)
endif

ifeq ($(CAPSTONE_SHARED),yes)
Expand Down Expand Up @@ -408,14 +406,7 @@ endif

install: $(PKGCFGF) $(ARCHIVE) $(LIBRARY)
mkdir -p $(DESTDIR)/$(LIBDIR)
ifeq ($(CAPSTONE_SHARED),yes)
$(INSTALL_LIB) $(LIBRARY) $(DESTDIR)/$(LIBDIR)
ifneq ($(VERSION_EXT),)
cd $(DESTDIR)/$(LIBDIR) && \
rm -f lib$(LIBNAME).$(EXT) && \
ln -s lib$(LIBNAME).$(VERSION_EXT) lib$(LIBNAME).$(EXT)
endif
endif
$(call install-library,$(DESTDIR)/$(LIBDIR))
ifeq ($(CAPSTONE_STATIC),yes)
$(INSTALL_DATA) $(ARCHIVE) $(DESTDIR)/$(LIBDIR)
endif
Expand Down Expand Up @@ -471,7 +462,7 @@ TESTS += test_skipdata test_skipdata.static test_iter.static
check:
@for t in $(TESTS); do \
echo Check $$t ... ; \
./tests/$$t > /dev/null && echo OK || echo FAILED; \
LD_LIBRARY_PATH=./tests ./tests/$$t > /dev/null && echo OK || echo FAILED; \
done

$(OBJDIR)/%.o: %.c
Expand All @@ -484,6 +475,20 @@ else
endif


ifeq ($(CAPSTONE_SHARED),yes)
define install-library
$(INSTALL_LIB) $(LIBRARY) $1
$(if $(VERSION_EXT),
cd $1 && \
rm -f lib$(LIBNAME).$(EXT) && \
ln -s lib$(LIBNAME).$(VERSION_EXT) lib$(LIBNAME).$(EXT))
endef
else
define install-library
endef
endif


define create-archive
$(AR) q $(ARCHIVE) $(LIBOBJ)
$(RANLIB) $(ARCHIVE)
Expand Down

0 comments on commit 03ff67a

Please sign in to comment.