1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Files: Copy include/ folder and its content to case SHARED is set to 1 in Makefile

This commit is contained in:
jsteube 2018-01-18 12:09:51 +01:00
parent 17f6324886
commit 7c1fb0140c
2 changed files with 52 additions and 40 deletions

View File

@ -39,6 +39,7 @@
- Documents: Added docs/limits.txt
- Files: Switched back to relative current working directory on windows to workaround problems with unicode characters
- Files: Copy include/ folder and its content to case SHARED is set to 1 in Makefile
- Hash Parser: Changed the way large strings are handled/truncated within the event buffer if they are too large to fit
- Hash Parser: Fixed our use of strtok_r () calls
- Self Test: Skip self-test for mode 8900 user-configurable scrypt settings are incompatible to fixed settings in the self-test hash

View File

@ -47,6 +47,8 @@ DESTDIR ?=
PREFIX ?= /usr/local
INSTALL_FOLDER ?= $(PREFIX)/bin
INCLUDE_ROOT_FOLDER ?= $(PREFIX)/include
INCLUDE_FOLDER ?= $(INCLUDE_ROOT_FOLDER)/hashcat
LIBRARY_FOLDER ?= $(PREFIX)/lib
SHARED_ROOT_FOLDER ?= $(PREFIX)/share
SHARED_FOLDER ?= $(SHARED_ROOT_FOLDER)/hashcat
@ -333,66 +335,75 @@ win64: hashcat64.exe
##
ifeq ($(SHARED),1)
install: install_docs install_shared install_library install_hashcat
install: install_docs install_shared install_include install_library install_hashcat
else
install: install_docs install_shared install_hashcat
install: install_docs install_shared install_hashcat
endif
# we need this extra target to make sure that for parallel builds (i.e. 2+ Makefile targets could possible run at the same time)
# the root folder of the shared directory is created first (and is a dependency for the targets that depend on it)
install_make_include_root:
$(INSTALL) -m 755 -d $(DESTDIR)$(INCLUDE_ROOT_FOLDER)
install_make_share_root:
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_ROOT_FOLDER)
install_docs: install_make_share_root
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/docs
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/charsets
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/masks
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/rules
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/extra
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion
$(INSTALL) -m 644 example.dict $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 644 example0.hash $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 644 example400.hash $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 644 example500.hash $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 755 example0.sh $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 755 example400.sh $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 755 example500.sh $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 644 extra/tab_completion/hashcat.sh $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion/
$(INSTALL) -m 644 extra/tab_completion/howto.txt $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion/
$(INSTALL) -m 755 extra/tab_completion/install $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion/
$(FIND) docs/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) docs/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) charsets/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) charsets/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) masks/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) masks/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) rules/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) rules/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(SED) $(SED_IN_PLACE) 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example0.sh
$(SED) $(SED_IN_PLACE) 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example400.sh
$(SED) $(SED_IN_PLACE) 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example500.sh
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/docs
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/charsets
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/masks
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/rules
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/extra
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion
$(INSTALL) -m 644 example.dict $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 644 example0.hash $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 644 example400.hash $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 644 example500.hash $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 755 example0.sh $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 755 example400.sh $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 755 example500.sh $(DESTDIR)$(DOCUMENT_FOLDER)/
$(INSTALL) -m 644 extra/tab_completion/hashcat.sh $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion/
$(INSTALL) -m 644 extra/tab_completion/howto.txt $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion/
$(INSTALL) -m 755 extra/tab_completion/install $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion/
$(FIND) docs/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) docs/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) charsets/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) charsets/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) masks/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) masks/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) rules/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(FIND) rules/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
$(SED) $(SED_IN_PLACE) 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example0.sh
$(SED) $(SED_IN_PLACE) 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example400.sh
$(SED) $(SED_IN_PLACE) 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example500.sh
install_shared: install_make_share_root
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/OpenCL
$(INSTALL) -m 644 hashcat.hctune $(DESTDIR)$(SHARED_FOLDER)/
$(INSTALL) -m 644 hashcat.hcstat2 $(DESTDIR)$(SHARED_FOLDER)/
$(FIND) OpenCL/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/{} \;
$(FIND) OpenCL/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(SHARED_FOLDER)/{} \;
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)
$(INSTALL) -m 644 hashcat.hctune $(DESTDIR)$(SHARED_FOLDER)/
$(INSTALL) -m 644 hashcat.hcstat2 $(DESTDIR)$(SHARED_FOLDER)/
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/OpenCL
$(FIND) OpenCL/ -type d -mindepth 1 -execdir $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/OpenCL/{} \;
$(FIND) OpenCL/ -type f -mindepth 1 -execdir $(INSTALL) -m 644 {} $(DESTDIR)$(SHARED_FOLDER)/OpenCL/{} \;
install_include: install_make_include_root
$(INSTALL) -m 755 -d $(DESTDIR)$(INCLUDE_FOLDER)
$(FIND) include/ -type d -mindepth 1 -execdir $(INSTALL) -m 755 -d $(DESTDIR)$(INCLUDE_FOLDER)/{} \;
$(FIND) include/ -type f -mindepth 1 -execdir $(INSTALL) -m 644 {} $(DESTDIR)$(INCLUDE_FOLDER)/{} \;
install_library: $(HASHCAT_LIBRARY)
$(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER)
$(INSTALL) -m 755 $(HASHCAT_LIBRARY) $(DESTDIR)$(LIBRARY_FOLDER)/
$(INSTALL) -m 755 -d $(DESTDIR)$(LIBRARY_FOLDER)
$(INSTALL) -m 755 $(HASHCAT_LIBRARY) $(DESTDIR)$(LIBRARY_FOLDER)/
install_hashcat: $(HASHCAT_FRONTEND)
$(INSTALL) -m 755 -d $(DESTDIR)$(INSTALL_FOLDER)
$(INSTALL) -m 755 $(HASHCAT_FRONTEND) $(DESTDIR)$(INSTALL_FOLDER)/
$(INSTALL) -m 755 -d $(DESTDIR)$(INSTALL_FOLDER)
$(INSTALL) -m 755 $(HASHCAT_FRONTEND) $(DESTDIR)$(INSTALL_FOLDER)/
uninstall:
$(RM) -f $(DESTDIR)$(INSTALL_FOLDER)/$(HASHCAT_FRONTEND)
$(RM) -f $(DESTDIR)$(LIBRARY_FOLDER)/$(HASHCAT_LIBRARY)
$(RM) -rf $(DESTDIR)$(INCLUDE_FOLDER)
$(RM) -rf $(DESTDIR)$(SHARED_FOLDER)
$(RM) -rf $(DESTDIR)$(DOCUMENT_FOLDER)