1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 15:18:16 +00:00

Add macOS library install pathnames

This commit is contained in:
RAN1 2018-07-24 19:04:20 -04:00
parent 5ea70dc549
commit 5bfdf79ed8

View File

@ -57,6 +57,7 @@ CC := clang
SED := /usr/bin/sed SED := /usr/bin/sed
SED_IN_PLACE := -i "" SED_IN_PLACE := -i ""
PROD_VERS := $(shell sw_vers -productVersion | cut -d. -f2) PROD_VERS := $(shell sw_vers -productVersion | cut -d. -f2)
INSTALL_NAME_TOOL := install_name_tool
endif endif
ifeq ($(UNAME),FreeBSD) ifeq ($(UNAME),FreeBSD)
@ -446,6 +447,9 @@ install_shared: install_make_shared_root
install_library: $(HASHCAT_LIBRARY) install_library: $(HASHCAT_LIBRARY)
$(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER) $(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER)
$(INSTALL) -m 755 $(HASHCAT_LIBRARY) $(DESTDIR)$(LIBRARY_FOLDER)/ $(INSTALL) -m 755 $(HASHCAT_LIBRARY) $(DESTDIR)$(LIBRARY_FOLDER)/
ifeq ($(UNAME),Darwin)
$(INSTALL_NAME_TOOL) -id $(DESTDIR)$(LIBRARY_FOLDER)/$(HASHCAT_LIBRARY) $(DESTDIR)$(LIBRARY_FOLDER)/$(HASHCAT_LIBRARY)
endif
install_library_dev: install_make_library_dev_root install_library_dev: install_make_library_dev_root
$(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_DEV_FOLDER) $(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_DEV_FOLDER)
@ -455,6 +459,12 @@ install_library_dev: install_make_library_dev_root
install_hashcat: $(HASHCAT_FRONTEND) install_hashcat: $(HASHCAT_FRONTEND)
$(INSTALL) -m 755 -d $(DESTDIR)$(INSTALL_FOLDER) $(INSTALL) -m 755 -d $(DESTDIR)$(INSTALL_FOLDER)
$(INSTALL) -m 755 $(HASHCAT_FRONTEND) $(DESTDIR)$(INSTALL_FOLDER)/ $(INSTALL) -m 755 $(HASHCAT_FRONTEND) $(DESTDIR)$(INSTALL_FOLDER)/
ifeq ($(SHARED),1)
ifeq ($(UNAME),Darwin)
$(INSTALL_NAME_TOOL) -change @executable_path/$(HASHCAT_LIBRARY) \
$(DESTDIR)$(LIBRARY_FOLDER)/$(HASHCAT_LIBRARY) $(DESTDIR)$(INSTALL_FOLDER)/$(HASHCAT_FRONTEND)
endif
endif
uninstall: uninstall:
$(RM) -f $(DESTDIR)$(INSTALL_FOLDER)/$(HASHCAT_FRONTEND) $(RM) -f $(DESTDIR)$(INSTALL_FOLDER)/$(HASHCAT_FRONTEND)
@ -483,7 +493,7 @@ endif
ifeq ($(UNAME),Darwin) ifeq ($(UNAME),Darwin)
$(HASHCAT_LIBRARY): $(NATIVE_SHARED_OBJS) $(HASHCAT_LIBRARY): $(NATIVE_SHARED_OBJS)
$(CC) $^ -o $@ $(LFLAGS_NATIVE) -shared -current_version $(VERSION_PURE) -compatibility_version $(VERSION_PURE) $(CC) $^ -o $@ $(LFLAGS_NATIVE) -shared -install_name @executable_path/$@ -current_version $(VERSION_PURE) -compatibility_version $(VERSION_PURE)
else 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)