2015-12-04 14:47:52 +00:00
|
|
|
##
|
2016-09-11 20:20:15 +00:00
|
|
|
## Author......: See docs/credits.txt
|
2015-12-04 14:47:52 +00:00
|
|
|
## License.....: MIT
|
|
|
|
##
|
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
PROG_NAME := hashcat
|
2016-01-20 19:55:09 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
## Detect Operating System
|
|
|
|
##
|
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
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
|
2016-10-30 12:54:24 +00:00
|
|
|
UNAME := $(patsubst CYGWIN_NT-%,CYGWIN,$(UNAME))
|
2016-01-20 19:55:09 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
# same for msys
|
|
|
|
UNAME := $(patsubst MSYS_NT-%,MSYS2,$(UNAME))
|
|
|
|
UNAME := $(patsubst MINGW32_NT-%,MSYS2,$(UNAME))
|
|
|
|
UNAME := $(patsubst MINGW64_NT-%,MSYS2,$(UNAME))
|
|
|
|
|
|
|
|
ifeq (,$(filter $(UNAME),Linux FreeBSD Darwin CYGWIN MSYS2))
|
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-10-30 12:54:24 +00:00
|
|
|
MAKEFLAGS += -l -j -rR --no-print-directory
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
ifneq ($(findstring clean,$(MAKECMDGOALS)),)
|
2016-10-30 12:54:24 +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-10-30 12:54:24 +00:00
|
|
|
DESTDIR ?=
|
|
|
|
PREFIX ?= /usr/local
|
2015-12-13 11:21:36 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
INSTALL_FOLDER ?= $(PREFIX)/bin
|
|
|
|
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-10-30 12:54:24 +00:00
|
|
|
OPENCL_HEADERS_KHRONOS := deps/OpenCL-Headers
|
2016-01-03 12:17:14 +00:00
|
|
|
|
2016-01-02 16:42:47 +00:00
|
|
|
##
|
|
|
|
## Native compiler paths
|
|
|
|
##
|
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
CC := gcc
|
|
|
|
FIND := find
|
|
|
|
INSTALL := install
|
|
|
|
RM := rm
|
|
|
|
SED := sed
|
2016-10-31 08:34:22 +00:00
|
|
|
|
2016-07-05 19:14:11 +00:00
|
|
|
ifeq ($(UNAME),Darwin)
|
2016-10-31 08:34:22 +00:00
|
|
|
CC := clang
|
2016-10-30 12:54:24 +00:00
|
|
|
SED := gsed
|
2016-07-05 19:14:11 +00:00
|
|
|
endif
|
2016-10-31 08:34:22 +00:00
|
|
|
|
2016-07-05 19:14:11 +00:00
|
|
|
ifeq ($(UNAME),FreeBSD)
|
2016-10-30 12:54:24 +00:00
|
|
|
CC := cc
|
|
|
|
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
|
|
|
##
|
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
CC_LINUX_32 := gcc
|
|
|
|
CC_LINUX_64 := gcc
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
CC_WIN_32 := i686-w64-mingw32-gcc
|
|
|
|
CC_WIN_64 := x86_64-w64-mingw32-gcc
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
## Misc stuff
|
|
|
|
##
|
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
COMPTIME := $(shell date +%s)
|
|
|
|
|
|
|
|
VERSION_EXPORT := $Format:%D$
|
|
|
|
VERSION_TAG := $(shell test -d .git && git describe --tags --dirty=+ || echo "$(VERSION_EXPORT)"|cut -d, -f2|$(SED) -r 's|.* (\w+/)?([^ ]+)|\2|')
|
2016-06-11 08:52:00 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
BINARY_NATIVE := $(PROG_NAME)
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
##
|
2016-10-30 21:47:48 +00:00
|
|
|
## General compiler and linker options
|
2015-12-04 14:47:52 +00:00
|
|
|
##
|
|
|
|
|
2016-10-30 19:37:02 +00:00
|
|
|
CFLAGS := -pipe -std=c99 -Iinclude/ -IOpenCL/
|
|
|
|
CFLAGS += -W
|
|
|
|
CFLAGS += -Wall
|
|
|
|
CFLAGS += -Wextra
|
|
|
|
CFLAGS += -Wfloat-equal
|
|
|
|
CFLAGS += -Wundef
|
|
|
|
CFLAGS += -Wshadow
|
|
|
|
CFLAGS += -Wmissing-declarations
|
|
|
|
CFLAGS += -Wmissing-prototypes
|
2016-10-30 19:39:27 +00:00
|
|
|
CFLAGS += -Wpointer-arith
|
2016-10-30 19:45:44 +00:00
|
|
|
CFLAGS += -Wstrict-prototypes
|
2016-10-30 20:56:56 +00:00
|
|
|
CFLAGS += -Waggregate-return
|
|
|
|
CFLAGS += -Wswitch-enum
|
|
|
|
CFLAGS += -Wunreachable-code
|
|
|
|
CFLAGS += -Winit-self
|
|
|
|
CFLAGS += -Werror-implicit-function-declaration
|
|
|
|
CFLAGS += -Wformat
|
2016-10-31 08:19:37 +00:00
|
|
|
CFLAGS += -Wno-format-zero-length
|
2016-11-02 22:40:14 +00:00
|
|
|
CFLAGS += -ftrapv
|
2016-10-30 21:47:48 +00:00
|
|
|
|
|
|
|
# the following compiler options produce warnings that should be fixed at some time
|
|
|
|
|
2016-11-03 11:09:29 +00:00
|
|
|
#CFLAGS += -Wsizeof-pointer-memaccess
|
2016-10-30 21:47:48 +00:00
|
|
|
#CFLAGS += -Wcast-align
|
|
|
|
#CFLAGS += -Wcast-qual
|
2016-10-30 20:56:56 +00:00
|
|
|
#CFLAGS += -Wsign-conversion
|
2016-10-30 21:47:48 +00:00
|
|
|
#CFLAGS += -Wwrite-strings
|
2016-10-30 20:56:56 +00:00
|
|
|
#CFLAGS += -pedantic
|
2016-10-30 19:37:02 +00:00
|
|
|
|
2016-10-30 20:58:22 +00:00
|
|
|
# default linux and freebsd thread stack size is 2MB
|
|
|
|
# default windows thread stack size is 1MB
|
|
|
|
# default OSX thread stack size is 512kB
|
2016-10-30 21:22:26 +00:00
|
|
|
# unfortionally, this option isn't supported by older GCC and clang versions
|
2016-10-30 20:58:22 +00:00
|
|
|
|
2016-10-30 21:47:48 +00:00
|
|
|
#CFLAGS += -Wstack-usage=524288
|
2016-10-30 20:58:22 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
LFLAGS :=
|
2016-03-06 11:03:08 +00:00
|
|
|
|
|
|
|
ifndef DEBUG
|
2016-10-30 12:54:24 +00:00
|
|
|
CFLAGS += -O2
|
|
|
|
LFLAGS += -s
|
2016-03-06 11:03:08 +00:00
|
|
|
else
|
2016-10-30 12:54:24 +00:00
|
|
|
CFLAGS += -DDEBUG -g -ggdb
|
2016-03-06 11:03:08 +00:00
|
|
|
ifeq ($(DEBUG),2)
|
2016-10-30 12:54:24 +00:00
|
|
|
CFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
2016-01-20 19:55:09 +00:00
|
|
|
endif
|
2016-10-10 09:27:50 +00:00
|
|
|
endif
|
|
|
|
|
2016-01-03 17:50:02 +00:00
|
|
|
##
|
|
|
|
## Native compilation target
|
|
|
|
##
|
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
ifeq ($(UNAME),Linux)
|
2016-10-30 12:54:24 +00:00
|
|
|
CFLAGS_NATIVE := $(CFLAGS)
|
|
|
|
CFLAGS_NATIVE += -I$(OPENCL_HEADERS_KHRONOS)/
|
|
|
|
CFLAGS_NATIVE += -march=native
|
|
|
|
CFLAGS_NATIVE += -DWITH_HWMON
|
|
|
|
LFLAGS_NATIVE := $(LFLAGS)
|
|
|
|
LFLAGS_NATIVE += -lpthread -ldl
|
|
|
|
endif # Linux
|
2016-01-03 17:50:02 +00:00
|
|
|
|
2016-07-05 18:58:28 +00:00
|
|
|
ifeq ($(UNAME),FreeBSD)
|
2016-10-30 12:54:24 +00:00
|
|
|
CFLAGS_NATIVE := $(CFLAGS)
|
|
|
|
CFLAGS_NATIVE += -I$(OPENCL_HEADERS_KHRONOS)/
|
|
|
|
CFLAGS_NATIVE += -march=native
|
|
|
|
LFLAGS_NATIVE := $(LFLAGS)
|
|
|
|
LFLAGS_NATIVE += -lpthread
|
|
|
|
endif # FreeBSD
|
2016-10-13 15:27:09 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
ifeq ($(UNAME),Darwin)
|
|
|
|
export MACOSX_DEPLOYMENT_TARGET=10.9
|
|
|
|
CFLAGS_NATIVE := $(CFLAGS)
|
|
|
|
CFLAGS_NATIVE += -march=native
|
|
|
|
LFLAGS_NATIVE := $(LFLAGS)
|
2016-10-30 13:31:17 +00:00
|
|
|
LFLAGS_NATIVE += -framework OpenCL
|
2016-10-30 12:54:24 +00:00
|
|
|
LFLAGS_NATIVE += -lpthread
|
|
|
|
endif # Darwin
|
|
|
|
|
|
|
|
ifeq ($(UNAME),CYGWIN)
|
|
|
|
CFLAGS_NATIVE := $(CFLAGS)
|
|
|
|
CFLAGS_NATIVE += -I$(OPENCL_HEADERS_KHRONOS)/
|
|
|
|
CFLAGS_NATIVE += -march=native
|
|
|
|
CFLAGS_NATIVE += -DWITH_HWMON
|
|
|
|
LFLAGS_NATIVE := $(LFLAGS)
|
|
|
|
LFLAGS_NATIVE += -Wl,--dynamicbase -Wl,--nxcompat
|
|
|
|
LFLAGS_NATIVE += -lpsapi
|
|
|
|
endif # CYGWIN
|
|
|
|
|
|
|
|
ifeq ($(UNAME),MSYS2)
|
|
|
|
CFLAGS_NATIVE := $(CFLAGS)
|
|
|
|
CFLAGS_NATIVE += -I$(OPENCL_HEADERS_KHRONOS)/
|
|
|
|
CFLAGS_NATIVE += -march=native
|
|
|
|
CFLAGS_NATIVE += -DWITH_HWMON
|
|
|
|
LFLAGS_NATIVE := $(LFLAGS)
|
|
|
|
LFLAGS_NATIVE += -Wl,--dynamicbase -Wl,--nxcompat
|
|
|
|
LFLAGS_NATIVE += -lpsapi
|
|
|
|
endif # MSYS2
|
|
|
|
|
|
|
|
##
|
|
|
|
## Native compilation target (shared)
|
|
|
|
##
|
|
|
|
|
|
|
|
CFLAGS_NATIVE_SHARED := $(CFLAGS_NATIVE)
|
|
|
|
CFLAGS_NATIVE_SHARED += -fpic
|
|
|
|
LFLAGS_NATIVE_SHARED := $(LFLAGS_NATIVE)
|
|
|
|
|
|
|
|
##
|
|
|
|
## Cross compilation targets
|
|
|
|
##
|
|
|
|
|
|
|
|
CFLAGS_CROSS_LINUX32 := $(CFLAGS)
|
|
|
|
CFLAGS_CROSS_LINUX32 += -I$(OPENCL_HEADERS_KHRONOS)/
|
|
|
|
CFLAGS_CROSS_LINUX32 += -m32
|
|
|
|
CFLAGS_CROSS_LINUX32 += -DWITH_HWMON
|
|
|
|
CFLAGS_CROSS_LINUX64 := $(CFLAGS)
|
|
|
|
CFLAGS_CROSS_LINUX64 += -I$(OPENCL_HEADERS_KHRONOS)/
|
|
|
|
CFLAGS_CROSS_LINUX64 += -m64
|
|
|
|
CFLAGS_CROSS_LINUX64 += -DWITH_HWMON
|
|
|
|
CFLAGS_CROSS_WIN32 := $(CFLAGS)
|
|
|
|
CFLAGS_CROSS_WIN32 += -I$(OPENCL_HEADERS_KHRONOS)/
|
|
|
|
CFLAGS_CROSS_WIN32 += -m32
|
|
|
|
CFLAGS_CROSS_WIN32 += -DWITH_HWMON
|
|
|
|
CFLAGS_CROSS_WIN64 := $(CFLAGS)
|
|
|
|
CFLAGS_CROSS_WIN64 += -I$(OPENCL_HEADERS_KHRONOS)/
|
|
|
|
CFLAGS_CROSS_WIN64 += -m64
|
|
|
|
CFLAGS_CROSS_WIN64 += -DWITH_HWMON
|
|
|
|
|
|
|
|
LFLAGS_CROSS_LINUX32 := $(LFLAGS)
|
|
|
|
LFLAGS_CROSS_LINUX32 += -lpthread -ldl
|
|
|
|
LFLAGS_CROSS_LINUX64 := $(LFLAGS)
|
|
|
|
LFLAGS_CROSS_LINUX64 += -lpthread -ldl
|
|
|
|
LFLAGS_CROSS_WIN32 := $(LFLAGS)
|
|
|
|
LFLAGS_CROSS_WIN32 += -Wl,--dynamicbase -Wl,--nxcompat
|
|
|
|
LFLAGS_CROSS_WIN32 += -lpsapi
|
|
|
|
LFLAGS_CROSS_WIN64 := $(LFLAGS)
|
|
|
|
LFLAGS_CROSS_WIN64 += -Wl,--dynamicbase -Wl,--nxcompat
|
|
|
|
LFLAGS_CROSS_WIN64 += -lpsapi
|
|
|
|
|
|
|
|
##
|
|
|
|
## Windows CRT file globbing
|
2016-01-03 17:50:02 +00:00
|
|
|
##
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
CRT_GLOB_32 :=
|
|
|
|
CRT_GLOB_64 :=
|
|
|
|
CRT_GLOB_INCLUDE_FOLDER := $(dir $(lastword $(MAKEFILE_LIST)))
|
2016-10-11 10:23:50 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
include $(CRT_GLOB_INCLUDE_FOLDER)/win_file_globbing.mk
|
2016-01-02 16:42:47 +00:00
|
|
|
|
2016-01-20 19:55:09 +00:00
|
|
|
##
|
|
|
|
## Objects
|
|
|
|
##
|
|
|
|
|
2016-11-05 22:19:13 +00:00
|
|
|
OBJS_ALL := affinity autotune benchmark bitmap bitops combinator common convert cpt cpu_aes cpu_crc32 cpu_des cpu_md4 cpu_md5 cpu_sha1 cpu_sha256 debugfile dictstat dispatch dynloader event ext_ADL ext_nvapi ext_nvml ext_OpenCL ext_sysfs ext_xnvctrl filehandling folder hashcat hashes hlfmt hwmon induct interface locking logfile loopback memory monitor mpsp opencl outfile_check outfile potfile restore rp rp_cpu rp_kernel_on_cpu shared status stdout straight terminal thread timer tuningdb usage user_options weak_hash wordlist
|
2016-01-20 19:55:09 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
NATIVE_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).NATIVE.o)
|
|
|
|
NATIVE_SHARED_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).NATIVE.SHARED.o)
|
2016-01-20 19:55:09 +00:00
|
|
|
|
2016-11-28 14:20:10 +00:00
|
|
|
ifeq ($(UNAME),CYGWIN)
|
|
|
|
NATIVE_OBJS += $(CRT_GLOB)
|
|
|
|
endif # CYGWIN
|
|
|
|
|
|
|
|
ifeq ($(UNAME),MSYS2)
|
|
|
|
NATIVE_OBJS += $(CRT_GLOB)
|
|
|
|
endif # MSYS2
|
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
LINUX_32_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).LINUX.32.o)
|
|
|
|
LINUX_64_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).LINUX.64.o)
|
2016-06-07 10:39:41 +00:00
|
|
|
|
2016-10-30 12:54:24 +00:00
|
|
|
WIN_32_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).WIN.32.o) $(CRT_GLOB_32)
|
|
|
|
WIN_64_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).WIN.64.o) $(CRT_GLOB_64)
|
2016-06-07 10:39:41 +00:00
|
|
|
|
2015-12-04 14:47:52 +00:00
|
|
|
##
|
2016-10-30 12:54:24 +00:00
|
|
|
## Targets
|
2015-12-04 14:47:52 +00:00
|
|
|
##
|
|
|
|
|
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-10-13 15:27:09 +00:00
|
|
|
$(RM) -f obj/*.o *.bin *.exe *.restore *.out *.pot *.log hashcat hashcat_shared libhashcat.so 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-10-13 15:27:09 +00:00
|
|
|
obj/%.NATIVE.o: src/%.c
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC) -c $(CFLAGS_NATIVE) -o $@ $^
|
2016-10-13 15:27:09 +00:00
|
|
|
|
|
|
|
$(BINARY_NATIVE): $(NATIVE_OBJS) src/main.c
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC) $(CFLAGS_NATIVE) -o $@ $^ $(LFLAGS_NATIVE) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\" -DINSTALL_FOLDER=\"$(INSTALL_FOLDER)\" -DSHARED_FOLDER=\"$(SHARED_FOLDER)\" -DDOCUMENT_FOLDER=\"$(DOCUMENT_FOLDER)\"
|
2016-10-13 15:27:09 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
## native compiled hashcat (shared)
|
|
|
|
##
|
|
|
|
|
|
|
|
obj/%.NATIVE.SHARED.o: src/%.c
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC) -c $(CFLAGS_NATIVE_SHARED) -o $@ $^
|
2016-10-13 15:27:09 +00:00
|
|
|
|
|
|
|
lib$(BINARY_NATIVE).so: $(NATIVE_SHARED_OBJS)
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC) -o $@ $^ $(LFLAGS_NATIVE_SHARED) -shared
|
2016-01-02 16:42:47 +00:00
|
|
|
|
2016-10-13 15:27:09 +00:00
|
|
|
$(BINARY_NATIVE)_shared: lib$(BINARY_NATIVE).so src/main_shared.c
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC) $(CFLAGS_NATIVE_SHARED) -o $@ $^ $(LFLAGS_NATIVE_SHARED) -L. -lhashcat -Wl,-rpath=. -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-10-30 12:54:24 +00:00
|
|
|
$(CC_LINUX_32) $(CFLAGS_CROSS_LINUX32) -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-10-30 12:54:24 +00:00
|
|
|
$(CC_LINUX_64) $(CFLAGS_CROSS_LINUX64) -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-10-30 12:54:24 +00:00
|
|
|
$(CC_WIN_32) $(CFLAGS_CROSS_WIN32) -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-10-30 12:54:24 +00:00
|
|
|
$(CC_WIN_64) $(CFLAGS_CROSS_WIN64) -c -o $@ $<
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-09-30 20:52:44 +00:00
|
|
|
hashcat32.bin: src/main.c $(LINUX_32_OBJS)
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC_LINUX_32) $(CFLAGS_CROSS_LINUX32) -o $@ $^ $(LFLAGS_CROSS_LINUX32) -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-09-30 20:52:44 +00:00
|
|
|
hashcat64.bin: src/main.c $(LINUX_64_OBJS)
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC_LINUX_64) $(CFLAGS_CROSS_LINUX64) -o $@ $^ $(LFLAGS_CROSS_LINUX64) -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-09-30 20:52:44 +00:00
|
|
|
hashcat32.exe: src/main.c $(WIN_32_OBJS)
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC_WIN_32) $(CFLAGS_CROSS_WIN32) -o $@ $^ $(LFLAGS_CROSS_WIN32) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\"
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-09-30 20:52:44 +00:00
|
|
|
hashcat64.exe: src/main.c $(WIN_64_OBJS)
|
2016-10-30 12:54:24 +00:00
|
|
|
$(CC_WIN_64) $(CFLAGS_CROSS_WIN64) -o $@ $^ $(LFLAGS_CROSS_WIN64) -DCOMPTIME=$(COMPTIME) -DVERSION_TAG=\"$(VERSION_TAG)\"
|