2015-12-04 14:47:52 +00:00
|
|
|
##
|
2016-01-20 19:55:09 +00:00
|
|
|
## Authors.....: Jens Steube <jens.steube@gmail.com>
|
|
|
|
## Gabriele Gristina <matrix@hashcat.net>
|
2016-02-16 15:42:08 +00:00
|
|
|
## magnum <john.magnum@hushmail.com>
|
2016-01-20 19:55:09 +00:00
|
|
|
##
|
2015-12-04 14:47:52 +00:00
|
|
|
## License.....: MIT
|
|
|
|
##
|
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
PROG_NAME := hashcat
|
2016-01-20 19:55:09 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
## Detect Operating System
|
|
|
|
##
|
|
|
|
|
|
|
|
UNAME := $(shell uname -s)
|
2016-06-11 06:08:22 +00:00
|
|
|
|
|
|
|
# we need to strip the windows version number to be able to build hashcat on cygwin hosts
|
|
|
|
UNAME := $(patsubst CYGWIN_NT-%,CYGWIN_NT-,$(UNAME))
|
2016-01-20 19:55:09 +00:00
|
|
|
|
2016-07-05 18:58:28 +00:00
|
|
|
ifeq (,$(filter $(UNAME),Linux Darwin CYGWIN_NT- FreeBSD))
|
2016-01-20 19:55:09 +00:00
|
|
|
$(error "! Your Operating System ($(UNAME)) is not supported by $(PROG_NAME) Makefile")
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),1)
|
|
|
|
$(warning "## Detected Operating System : $(UNAME)")
|
|
|
|
endif
|
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
##
|
|
|
|
## Makefile flags
|
|
|
|
##
|
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
MAKEFLAGS += -l -j -rR --no-print-directory
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
ifneq ($(findstring clean,$(MAKECMDGOALS)),)
|
2016-01-20 19:55:09 +00:00
|
|
|
MAKEFLAGS += -j 1
|
2015-12-04 14:47:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
##
|
2015-12-13 11:21:36 +00:00
|
|
|
## Installation paths (Linux only)
|
|
|
|
##
|
|
|
|
|
2016-06-10 19:20:53 +00:00
|
|
|
DESTDIR ?=
|
2016-01-02 23:40:31 +00:00
|
|
|
PREFIX ?= /usr/local
|
2015-12-13 11:21:36 +00:00
|
|
|
|
2016-01-02 23:40:31 +00:00
|
|
|
INSTALL_FOLDER ?= $(PREFIX)/bin
|
2016-01-20 19:55:09 +00:00
|
|
|
SHARED_FOLDER ?= $(PREFIX)/share/$(PROG_NAME)
|
|
|
|
DOCUMENT_FOLDER ?= $(PREFIX)/share/doc/$(PROG_NAME)
|
2015-12-13 11:21:36 +00:00
|
|
|
|
2015-12-15 17:58:02 +00:00
|
|
|
##
|
2016-05-10 17:07:07 +00:00
|
|
|
## Dependencies
|
2016-06-11 08:52:00 +00:00
|
|
|
## You may ignore them if you're compiling only a native binary and
|
|
|
|
## You have your own headers somewhere, for example: apt-get install opencl-headers
|
2015-12-15 17:58:02 +00:00
|
|
|
##
|
|
|
|
|
2016-01-03 12:17:14 +00:00
|
|
|
OPENCL_HEADERS_KHRONOS := deps/OpenCL-Headers
|
|
|
|
|
2016-01-02 16:42:47 +00:00
|
|
|
##
|
|
|
|
## Native compiler paths
|
|
|
|
##
|
|
|
|
|
2016-07-05 19:09:40 +00:00
|
|
|
CC := gcc
|
|
|
|
FIND := find
|
|
|
|
INSTALL := install
|
|
|
|
RM := rm
|
|
|
|
SED := sed
|
2016-07-05 19:14:11 +00:00
|
|
|
ifeq ($(UNAME),Darwin)
|
|
|
|
SED := gsed
|
|
|
|
endif
|
|
|
|
ifeq ($(UNAME),FreeBSD)
|
|
|
|
CC := cc
|
2016-07-05 19:09:40 +00:00
|
|
|
SED := gsed
|
2016-07-01 23:08:12 +00:00
|
|
|
endif
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
##
|
2016-01-02 16:42:47 +00:00
|
|
|
## Cross compiler paths
|
2015-12-04 14:47:52 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
CC_LINUX_32 := gcc
|
|
|
|
CC_LINUX_64 := gcc
|
|
|
|
|
|
|
|
CC_WIN_32 := i686-w64-mingw32-gcc
|
|
|
|
CC_WIN_64 := x86_64-w64-mingw32-gcc
|
|
|
|
|
|
|
|
##
|
|
|
|
## Misc stuff
|
|
|
|
##
|
|
|
|
|
2016-01-21 09:17:22 +00:00
|
|
|
COMPTIME := $(shell date +%s)
|
2016-06-11 08:52:00 +00:00
|
|
|
|
2016-05-19 09:15:15 +00:00
|
|
|
VERSION_EXPORT := $Format:%D$
|
2016-07-01 23:08:12 +00:00
|
|
|
VERSION_TAG := $(shell test -d .git && git describe --tags --dirty=+ || echo "$(VERSION_EXPORT)"|cut -d, -f2|$(SED) -r 's|.* (\w+/)?([^ ]+)|\2|')
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
## Compiler flags
|
|
|
|
##
|
|
|
|
|
2016-09-07 18:41:57 +00:00
|
|
|
CFLAGS += -pipe -W -Wall -std=c99 -Iinclude/ -IOpenCL/ -I$(OPENCL_HEADERS_KHRONOS)/
|
2016-03-06 11:03:08 +00:00
|
|
|
|
|
|
|
ifndef DEBUG
|
|
|
|
CFLAGS += -O2
|
|
|
|
else
|
|
|
|
CFLAGS += -DDEBUG -g -ggdb
|
|
|
|
ifeq ($(DEBUG),2)
|
|
|
|
CFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
|
|
|
endif
|
2016-01-20 19:55:09 +00:00
|
|
|
endif
|
2016-01-03 12:17:14 +00:00
|
|
|
|
2016-01-03 17:50:02 +00:00
|
|
|
##
|
|
|
|
## Native compilation target
|
|
|
|
##
|
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
BINARY_NATIVE := $(PROG_NAME)
|
|
|
|
|
|
|
|
ifeq ($(UNAME),Darwin)
|
|
|
|
export MACOSX_DEPLOYMENT_TARGET=10.9
|
2016-09-07 20:29:57 +00:00
|
|
|
CFLAGS_NATIVE :=
|
2016-01-03 12:17:14 +00:00
|
|
|
CFLAGS_NATIVE += $(CFLAGS)
|
2016-01-26 20:40:49 +00:00
|
|
|
LFLAGS_NATIVE := -lpthread
|
2016-07-04 19:01:51 +00:00
|
|
|
LFLAGS_NATIVE += $(LDFLAGS)
|
2016-02-02 00:14:33 +00:00
|
|
|
endif # darwin
|
2016-01-20 19:55:09 +00:00
|
|
|
|
|
|
|
ifeq ($(UNAME),Linux)
|
2016-09-07 20:29:57 +00:00
|
|
|
CFLAGS_NATIVE :=
|
2016-03-06 11:03:08 +00:00
|
|
|
ifndef DEBUG
|
|
|
|
CFLAGS_NATIVE += -s
|
|
|
|
endif
|
|
|
|
CFLAGS_NATIVE += $(CFLAGS)
|
2016-01-26 20:40:49 +00:00
|
|
|
LFLAGS_NATIVE := -lpthread -ldl
|
2016-01-20 19:55:09 +00:00
|
|
|
CFLAGS_NATIVE += -DHAVE_HWMON
|
2016-07-04 19:01:51 +00:00
|
|
|
LFLAGS_NATIVE += $(LDFLAGS)
|
2016-02-02 00:14:33 +00:00
|
|
|
endif # linux
|
2016-01-03 17:50:02 +00:00
|
|
|
|
2016-07-05 18:58:28 +00:00
|
|
|
ifeq ($(UNAME),FreeBSD)
|
2016-09-07 20:29:57 +00:00
|
|
|
CFLAGS_NATIVE :=
|
2016-07-05 18:58:28 +00:00
|
|
|
CFLAGS_NATIVE += $(CFLAGS)
|
|
|
|
LFLAGS_NATIVE := -lpthread
|
|
|
|
LFLAGS_NATIVE += $(LDFLAGS)
|
|
|
|
endif # freebsd
|
|
|
|
|
2016-01-03 17:50:02 +00:00
|
|
|
##
|
|
|
|
## Cross compilation target
|
|
|
|
##
|
|
|
|
|
2016-09-07 20:29:57 +00:00
|
|
|
CFLAGS_CROSS_LINUX :=
|
2016-03-06 11:03:08 +00:00
|
|
|
ifndef DEBUG
|
|
|
|
CFLAGS_CROSS_LINUX += -s
|
|
|
|
endif
|
|
|
|
CFLAGS_CROSS_LINUX += $(CFLAGS)
|
2016-01-20 19:55:09 +00:00
|
|
|
CFLAGS_CROSS_LINUX += -DHAVE_HWMON
|
|
|
|
|
2016-09-07 18:30:14 +00:00
|
|
|
#CFLAGS_CROSS_WIN := -D_WIN -DWIN -D__MSVCRT__ -D__USE_MINGW_ANSI_STDIO=1
|
2016-09-07 20:29:57 +00:00
|
|
|
CFLAGS_CROSS_WIN :=
|
2016-03-06 11:03:08 +00:00
|
|
|
ifndef DEBUG
|
|
|
|
CFLAGS_CROSS_WIN += -s
|
|
|
|
endif
|
|
|
|
CFLAGS_CROSS_WIN += $(filter-out -fsanitize=address,$(CFLAGS))
|
2016-01-20 19:55:09 +00:00
|
|
|
CFLAGS_CROSS_WIN += -DHAVE_HWMON
|
|
|
|
|
2016-01-03 12:17:14 +00:00
|
|
|
CFLAGS_CROSS_32 := -m32
|
|
|
|
CFLAGS_CROSS_64 := -m64
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-26 20:40:49 +00:00
|
|
|
LFLAGS_CROSS_LINUX := -lpthread -ldl
|
2016-01-03 12:17:14 +00:00
|
|
|
LFLAGS_CROSS_WIN := -lpsapi
|
2016-01-02 16:42:47 +00:00
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
##
|
|
|
|
## Objects
|
|
|
|
##
|
|
|
|
|
2016-09-10 15:35:58 +00:00
|
|
|
NATIVE_OBJS := obj/outfile.NATIVE.o obj/potfile.NATIVE.o obj/dictstat.NATIVE.o obj/wordlist.NATIVE.o obj/stdout.NATIVE.o obj/filenames.NATIVE.o obj/hlfmt.NATIVE.o obj/status.NATIVE.o obj/restore.NATIVE.o obj/bitmap.NATIVE.o obj/opencl.NATIVE.o obj/affinity.NATIVE.o obj/filehandling.NATIVE.o obj/tuningdb.NATIVE.o obj/locking.NATIVE.o obj/folder.NATIVE.o obj/bitops.NATIVE.o obj/convert.NATIVE.o obj/cpu_aes.NATIVE.o obj/cpu_crc32.NATIVE.o obj/cpu_des.NATIVE.o obj/cpu_md5.NATIVE.o obj/cpu_sha1.NATIVE.o obj/cpu_sha256.NATIVE.o obj/data.NATIVE.o obj/ext_OpenCL.NATIVE.o obj/hwmon.NATIVE.o obj/interface.NATIVE.o obj/logfile.NATIVE.o obj/logging.NATIVE.o obj/memory.NATIVE.o obj/mpsp.NATIVE.o obj/rp_cpu.NATIVE.o obj/rp_kernel_on_cpu.NATIVE.o obj/shared.NATIVE.o obj/terminal.NATIVE.o obj/usage.NATIVE.o
|
2016-01-20 19:55:09 +00:00
|
|
|
|
2016-05-29 22:05:46 +00:00
|
|
|
ifeq ($(UNAME),Linux)
|
2016-01-20 19:55:09 +00:00
|
|
|
NATIVE_OBJS += obj/ext_ADL.NATIVE.o
|
2016-06-03 09:33:59 +00:00
|
|
|
NATIVE_OBJS += obj/ext_nvapi.NATIVE.o
|
2016-01-20 19:55:09 +00:00
|
|
|
NATIVE_OBJS += obj/ext_nvml.NATIVE.o
|
2016-06-18 08:59:58 +00:00
|
|
|
NATIVE_OBJS += obj/ext_xnvctrl.NATIVE.o
|
2016-01-20 19:55:09 +00:00
|
|
|
endif
|
|
|
|
|
2016-09-10 15:35:58 +00:00
|
|
|
LINUX_32_OBJS := obj/outfile.LINUX.32.o obj/potfile.LINUX.32.o obj/dictstat.LINUX.32.o obj/wordlist.LINUX.32.o obj/stdout.LINUX.32.o obj/filenames.LINUX.32.o obj/hlfmt.LINUX.32.o obj/status.LINUX.32.o obj/restore.LINUX.32.o obj/bitmap.LINUX.32.o obj/opencl.LINUX.32.o obj/affinity.LINUX.32.o obj/filehandling.LINUX.32.o obj/tuningdb.LINUX.32.o obj/locking.LINUX.32.o obj/folder.LINUX.32.o obj/bitops.LINUX.32.o obj/convert.LINUX.32.o obj/cpu_aes.LINUX.32.o obj/cpu_crc32.LINUX.32.o obj/cpu_des.LINUX.32.o obj/cpu_md5.LINUX.32.o obj/cpu_sha1.LINUX.32.o obj/cpu_sha256.LINUX.32.o obj/data.LINUX.32.o obj/ext_ADL.LINUX.32.o obj/ext_nvapi.LINUX.32.o obj/ext_nvml.LINUX.32.o obj/ext_OpenCL.LINUX.32.o obj/ext_xnvctrl.LINUX.32.o obj/hwmon.LINUX.32.o obj/interface.LINUX.32.o obj/logfile.LINUX.32.o obj/logging.LINUX.32.o obj/memory.LINUX.32.o obj/mpsp.LINUX.32.o obj/rp_cpu.LINUX.32.o obj/rp_kernel_on_cpu.LINUX.32.o obj/shared.LINUX.32.o obj/terminal.LINUX.32.o obj/usage.LINUX.32.o
|
|
|
|
LINUX_64_OBJS := obj/outfile.LINUX.64.o obj/potfile.LINUX.64.o obj/dictstat.LINUX.64.o obj/wordlist.LINUX.64.o obj/stdout.LINUX.64.o obj/filenames.LINUX.64.o obj/hlfmt.LINUX.64.o obj/status.LINUX.64.o obj/restore.LINUX.64.o obj/bitmap.LINUX.64.o obj/opencl.LINUX.64.o obj/affinity.LINUX.64.o obj/filehandling.LINUX.64.o obj/tuningdb.LINUX.64.o obj/locking.LINUX.64.o obj/folder.LINUX.64.o obj/bitops.LINUX.64.o obj/convert.LINUX.64.o obj/cpu_aes.LINUX.64.o obj/cpu_crc32.LINUX.64.o obj/cpu_des.LINUX.64.o obj/cpu_md5.LINUX.64.o obj/cpu_sha1.LINUX.64.o obj/cpu_sha256.LINUX.64.o obj/data.LINUX.64.o obj/ext_ADL.LINUX.64.o obj/ext_nvapi.LINUX.64.o obj/ext_nvml.LINUX.64.o obj/ext_OpenCL.LINUX.64.o obj/ext_xnvctrl.LINUX.64.o obj/hwmon.LINUX.64.o obj/interface.LINUX.64.o obj/logfile.LINUX.64.o obj/logging.LINUX.64.o obj/memory.LINUX.64.o obj/mpsp.LINUX.64.o obj/rp_cpu.LINUX.64.o obj/rp_kernel_on_cpu.LINUX.64.o obj/shared.LINUX.64.o obj/terminal.LINUX.64.o obj/usage.LINUX.64.o
|
2016-01-20 19:55:09 +00:00
|
|
|
|
2016-08-18 13:16:10 +00:00
|
|
|
# Windows CRT file globbing:
|
|
|
|
|
|
|
|
CRT_GLOB_32 :=
|
|
|
|
CRT_GLOB_64 :=
|
|
|
|
CRT_GLOB_INCLUDE_FOLDER := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
|
|
|
2016-08-18 13:48:44 +00:00
|
|
|
include $(CRT_GLOB_INCLUDE_FOLDER)/win_file_globbing.mk
|
2016-06-07 10:39:41 +00:00
|
|
|
|
2016-09-10 15:35:58 +00:00
|
|
|
WIN_32_OBJS := obj/outfile.WIN.32.o obj/potfile.WIN.32.o obj/dictstat.WIN.32.o obj/wordlist.WIN.32.o obj/stdout.WIN.32.o obj/filenames.WIN.32.o obj/hlfmt.WIN.32.o obj/status.WIN.32.o obj/restore.WIN.32.o obj/bitmap.WIN.32.o obj/opencl.WIN.32.o obj/affinity.WIN.32.o obj/filehandling.WIN.32.o obj/tuningdb.WIN.32.o obj/locking.WIN.32.o obj/folder.WIN.32.o obj/bitops.WIN.32.o obj/convert.WIN.32.o obj/cpu_aes.WIN.32.o obj/cpu_crc32.WIN.32.o obj/cpu_des.WIN.32.o obj/cpu_md5.WIN.32.o obj/cpu_sha1.WIN.32.o obj/cpu_sha256.WIN.32.o obj/data.WIN.32.o obj/ext_ADL.WIN.32.o obj/ext_nvapi.WIN.32.o obj/ext_nvml.WIN.32.o obj/ext_OpenCL.WIN.32.o obj/ext_xnvctrl.WIN.32.o obj/hwmon.WIN.32.o obj/interface.WIN.32.o obj/logfile.WIN.32.o obj/logging.WIN.32.o obj/memory.WIN.32.o obj/mpsp.WIN.32.o obj/rp_cpu.WIN.32.o obj/rp_kernel_on_cpu.WIN.32.o obj/shared.WIN.32.o obj/terminal.WIN.32.o obj/usage.WIN.32.o $(CRT_GLOB_32)
|
|
|
|
WIN_64_OBJS := obj/outfile.WIN.64.o obj/potfile.WIN.64.o obj/dictstat.WIN.64.o obj/wordlist.WIN.64.o obj/stdout.WIN.64.o obj/filenames.WIN.64.o obj/hlfmt.WIN.64.o obj/status.WIN.64.o obj/restore.WIN.64.o obj/bitmap.WIN.64.o obj/opencl.WIN.64.o obj/affinity.WIN.64.o obj/filehandling.WIN.64.o obj/tuningdb.WIN.64.o obj/locking.WIN.64.o obj/folder.WIN.64.o obj/bitops.WIN.64.o obj/convert.WIN.64.o obj/cpu_aes.WIN.64.o obj/cpu_crc32.WIN.64.o obj/cpu_des.WIN.64.o obj/cpu_md5.WIN.64.o obj/cpu_sha1.WIN.64.o obj/cpu_sha256.WIN.64.o obj/data.WIN.64.o obj/ext_ADL.WIN.64.o obj/ext_nvapi.WIN.64.o obj/ext_nvml.WIN.64.o obj/ext_OpenCL.WIN.64.o obj/ext_xnvctrl.WIN.64.o obj/hwmon.WIN.64.o obj/interface.WIN.64.o obj/logfile.WIN.64.o obj/logging.WIN.64.o obj/memory.WIN.64.o obj/mpsp.WIN.64.o obj/rp_cpu.WIN.64.o obj/rp_kernel_on_cpu.WIN.64.o obj/shared.WIN.64.o obj/terminal.WIN.64.o obj/usage.WIN.64.o $(CRT_GLOB_64)
|
2016-06-07 10:39:41 +00:00
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
##
|
|
|
|
## Targets: Global
|
|
|
|
##
|
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
native: hashcat
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-02 16:42:47 +00:00
|
|
|
binaries: linux32 linux64 win32 win64
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-02 16:42:47 +00:00
|
|
|
clean:
|
2016-07-09 07:54:11 +00:00
|
|
|
$(RM) -f obj/*.o *.bin *.exe *.restore *.out *.pot *.log hashcat core
|
2016-01-02 23:40:31 +00:00
|
|
|
$(RM) -rf *.induct
|
|
|
|
$(RM) -rf *.outfiles
|
2016-01-20 19:55:09 +00:00
|
|
|
$(RM) -rf *.dSYM
|
2016-01-13 17:16:56 +00:00
|
|
|
$(RM) -rf kernels
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
linux32: hashcat32.bin
|
|
|
|
linux64: hashcat64.bin
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
win32: hashcat32.exe
|
|
|
|
win64: hashcat64.exe
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2015-12-13 11:21:36 +00:00
|
|
|
##
|
|
|
|
## Targets: Linux install
|
|
|
|
## How to make /usr/bin/install doing recursive??
|
|
|
|
##
|
|
|
|
|
2016-01-02 16:42:47 +00:00
|
|
|
install: native
|
2016-06-11 08:52:00 +00:00
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(INSTALL_FOLDER)
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/docs
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/extra
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/extra/tab_completion
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/charsets
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/masks
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/OpenCL
|
|
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/rules
|
|
|
|
$(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/
|
|
|
|
$(INSTALL) -m 644 hashcat.hcstat $(DESTDIR)$(SHARED_FOLDER)/
|
|
|
|
$(INSTALL) -m 644 hashcat.hctune $(DESTDIR)$(SHARED_FOLDER)/
|
|
|
|
$(INSTALL) -m 755 $(BINARY_NATIVE) $(DESTDIR)$(INSTALL_FOLDER)/
|
|
|
|
$(FIND) docs/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
|
|
|
|
$(FIND) charsets/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/{} \;
|
|
|
|
$(FIND) masks/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/{} \;
|
|
|
|
$(FIND) OpenCL/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/{} \;
|
|
|
|
$(FIND) rules/ -type d -exec $(INSTALL) -m 755 -d $(DESTDIR)$(SHARED_FOLDER)/{} \;
|
|
|
|
$(FIND) docs/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(DOCUMENT_FOLDER)/{} \;
|
|
|
|
$(FIND) charsets/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(SHARED_FOLDER)/{} \;
|
|
|
|
$(FIND) masks/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(SHARED_FOLDER)/{} \;
|
|
|
|
$(FIND) OpenCL/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(SHARED_FOLDER)/{} \;
|
|
|
|
$(FIND) rules/ -type f -exec $(INSTALL) -m 644 {} $(DESTDIR)$(SHARED_FOLDER)/{} \;
|
2016-06-11 09:39:49 +00:00
|
|
|
$(SED) -i 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example0.sh
|
|
|
|
$(SED) -i 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example400.sh
|
|
|
|
$(SED) -i 's/\.\/hashcat/hashcat/' $(DESTDIR)$(DOCUMENT_FOLDER)/example500.sh
|
2015-12-13 11:21:36 +00:00
|
|
|
|
|
|
|
uninstall:
|
2016-06-10 19:20:53 +00:00
|
|
|
$(RM) -f $(DESTDIR)$(INSTALL_FOLDER)/$(BINARY_NATIVE)
|
|
|
|
$(RM) -rf $(DESTDIR)$(SHARED_FOLDER)
|
|
|
|
$(RM) -rf $(DESTDIR)$(DOCUMENT_FOLDER)
|
2015-12-13 11:21:36 +00:00
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
##
|
2016-05-10 17:07:07 +00:00
|
|
|
## native compiled hashcat
|
2016-01-02 16:42:47 +00:00
|
|
|
##
|
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
obj/%.NATIVE.o: src/%.c
|
2016-06-11 08:52:00 +00:00
|
|
|
$(CC) $(CFLAGS_NATIVE) -c -o $@ $<
|
2016-01-02 16:42:47 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
hashcat: src/hashcat.c $(NATIVE_OBJS)
|
2016-06-11 08:52:00 +00:00
|
|
|
$(CC) $(CFLAGS_NATIVE) -o $(BINARY_NATIVE) $^ $(LFLAGS_NATIVE) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\"
|
2016-01-02 16:42:47 +00:00
|
|
|
|
|
|
|
##
|
2016-05-10 17:07:07 +00:00
|
|
|
## cross compiled hashcat for binary release version
|
2015-12-04 14:47:52 +00:00
|
|
|
##
|
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
obj/%.LINUX.32.o: src/%.c
|
2016-09-07 18:30:14 +00:00
|
|
|
$(CC_LINUX_32) $(CFLAGS_CROSS_LINUX) $(CFLAGS_CROSS_32) -c -o $@ $<
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
obj/%.LINUX.64.o: src/%.c
|
2016-09-07 18:30:14 +00:00
|
|
|
$(CC_LINUX_64) $(CFLAGS_CROSS_LINUX) $(CFLAGS_CROSS_64) -c -o $@ $<
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
obj/%.WIN.32.o: src/%.c
|
2016-09-07 18:30:14 +00:00
|
|
|
$(CC_WIN_32) $(CFLAGS_CROSS_WIN) $(CFLAGS_CROSS_32) -c -o $@ $<
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
obj/%.WIN.64.o: src/%.c
|
2016-09-07 18:30:14 +00:00
|
|
|
$(CC_WIN_64) $(CFLAGS_CROSS_WIN) $(CFLAGS_CROSS_64) -c -o $@ $<
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
hashcat32.bin: src/hashcat.c $(LINUX_32_OBJS)
|
2016-09-07 18:30:14 +00:00
|
|
|
$(CC_LINUX_32) $(CFLAGS_CROSS_LINUX) $(CFLAGS_CROSS_32) -o $@ $^ $(LFLAGS_CROSS_LINUX) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\"
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
hashcat64.bin: src/hashcat.c $(LINUX_64_OBJS)
|
2016-09-07 18:30:14 +00:00
|
|
|
$(CC_LINUX_64) $(CFLAGS_CROSS_LINUX) $(CFLAGS_CROSS_64) -o $@ $^ $(LFLAGS_CROSS_LINUX) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\"
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
hashcat32.exe: src/hashcat.c $(WIN_32_OBJS)
|
2016-09-07 18:30:14 +00:00
|
|
|
$(CC_WIN_32) $(CFLAGS_CROSS_WIN) $(CFLAGS_CROSS_32) -o $@ $^ $(LFLAGS_CROSS_WIN) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\"
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-05-10 17:07:07 +00:00
|
|
|
hashcat64.exe: src/hashcat.c $(WIN_64_OBJS)
|
2016-09-07 18:30:14 +00:00
|
|
|
$(CC_WIN_64) $(CFLAGS_CROSS_WIN) $(CFLAGS_CROSS_64) -o $@ $^ $(LFLAGS_CROSS_WIN) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\"
|