1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 08:08:10 +00: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
hashcat.exe hashcat.exe
libhashcat.so libhashcat.so
libhashcat*.dylib
hashcat.dll hashcat.dll
*.potfile *.potfile
*.restore *.restore

View File

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