mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 06:18:08 +00:00
create versioned library name and symlink unversioned name on *nix
This allows executables (e.g. unit tests) to link against the
libunicorn.so in the build directory, after the SONAME was added in
4860fdb3
.
Becuase libunicorn.so has an SONAME of libunicorn.so.0, the linker uses
the SONAME for the DT_NEEDED entry of the tests. But because a library
with that name did not exist, they would fail to run.
This commit is contained in:
parent
cf727ad323
commit
c7de7e44a6
2 changed files with 7 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,6 +4,8 @@
|
|||
*.o
|
||||
*.a
|
||||
*.dSYM
|
||||
*.so
|
||||
*.so.*
|
||||
|
||||
qemu/config-all-devices.mak
|
||||
|
||||
|
|
6
Makefile
6
Makefile
|
@ -131,7 +131,8 @@ LIBRARY = $(BLDIR)/$(LIBNAME).$(EXT)
|
|||
else ifeq ($(IS_CYGWIN),1)
|
||||
LIBRARY = $(BLDIR)/$(LIBNAME).$(EXT)
|
||||
else # *nix
|
||||
LIBRARY = $(BLDIR)/lib$(LIBNAME).$(EXT)
|
||||
LIBRARY = $(BLDIR)/lib$(LIBNAME).$(VERSION_EXT)
|
||||
LIBRARY_SYMLINK = $(BLDIR)/lib$(LIBNAME).$(EXT)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -229,6 +230,9 @@ ifeq ($(V),0)
|
|||
else
|
||||
$(CC) $(CFLAGS) $($(LIBNAME)_LDFLAGS) -shared $^ -o $(LIBRARY) $(GLIB) -lm
|
||||
endif
|
||||
ifneq (,$(LIBRARY_SYMLINK))
|
||||
@ln -sf $(LIBRARY) $(LIBRARY_SYMLINK)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(ARCHIVE): $(UC_TARGET_OBJ) uc.o hook.o
|
||||
|
|
Loading…
Reference in a new issue