mirror of
https://github.com/capstone-engine/capstone.git
synced 2025-03-09 01:13:45 +00:00
Fix check target for Unix-like environment
# Conflicts: # Makefile
This commit is contained in:
parent
b7cc6e4ffd
commit
efb07f3816
29
Makefile
29
Makefile
@ -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)
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user