1
mirror of https://github.com/hashcat/hashcat synced 2024-12-23 14:13:43 +01:00

Fix shared install on macOS

This commit is contained in:
RAN1 2018-07-23 17:09:37 -04:00
parent 6ae03e2b85
commit fa75e85896
2 changed files with 10 additions and 0 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
hashcat
hashcat.exe
libhashcat.so
libhashcat*.dylib
hashcat.dll
*.potfile
*.restore

View File

@ -98,6 +98,10 @@ LIBRARY_DEV_FOLDER ?= $(LIBRARY_DEV_ROOT_FOLDER)/hashcat
HASHCAT_FRONTEND := hashcat
HASHCAT_LIBRARY := libhashcat.so.$(VERSION_PURE)
ifeq ($(UNAME),Darwin)
HASHCAT_LIBRARY := libhashcat.$(VERSION_PURE).dylib
endif # Darwin
ifeq ($(UNAME),CYGWIN)
HASHCAT_FRONTEND := hashcat.exe
HASHCAT_LIBRARY := hashcat.dll
@ -477,8 +481,13 @@ obj/%.NATIVE.SHARED.o: deps/lzma_sdk/%.c
$(CC) -c $(CFLAGS_NATIVE) $< -o $@ -fpic
endif
ifeq ($(UNAME),Darwin)
$(HASHCAT_LIBRARY): $(NATIVE_SHARED_OBJS)
$(CC) $^ -o $@ $(LFLAGS_NATIVE) -shared -current_version $(VERSION_PURE) -compatibility_version $(VERSION_PURE)
else
$(HASHCAT_LIBRARY): $(NATIVE_SHARED_OBJS)
$(CC) $^ -o $@ $(LFLAGS_NATIVE) -shared -Wl,-soname,$(HASHCAT_LIBRARY)
endif
ifeq ($(SHARED),1)
$(HASHCAT_FRONTEND): src/main.c $(HASHCAT_LIBRARY)