mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 08:08:10 +00:00
Add support for building with system lzma-sdk
Fixes: #1528 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
a71c69983d
commit
83ce54a736
@ -5,9 +5,9 @@
|
||||
|
||||
#ifndef _EXT_LZMA_H
|
||||
|
||||
#include "lzma_sdk/Alloc.h"
|
||||
#include "lzma_sdk/LzmaDec.h"
|
||||
#include "lzma_sdk/Lzma2Dec.h"
|
||||
#include <Alloc.h>
|
||||
#include <LzmaDec.h>
|
||||
#include <Lzma2Dec.h>
|
||||
|
||||
int hc_lzma1_decompress (const unsigned char *in, SizeT *in_len, unsigned char *out, SizeT *out_len, const char *props);
|
||||
int hc_lzma2_decompress (const unsigned char *in, SizeT *in_len, unsigned char *out, SizeT *out_len, const char *props);
|
||||
|
18
src/Makefile
18
src/Makefile
@ -138,12 +138,15 @@ WIN_ICONV_64 := /opt/win-iconv-64
|
||||
##
|
||||
|
||||
COMPTIME := $(shell date +%s)
|
||||
SYSTEM_LZMA_SDK := 0
|
||||
|
||||
LZMA_SDK_INCLUDE := $(LIBRARY_DEV_ROOT_FOLDER)/lzma-sdk/C
|
||||
|
||||
##
|
||||
## General compiler and linker options
|
||||
##
|
||||
|
||||
CFLAGS += -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/
|
||||
CFLAGS += -pipe -std=gnu99 -Iinclude/ -IOpenCL/
|
||||
|
||||
ifeq ($(PRODUCTION),0)
|
||||
CFLAGS += -W
|
||||
@ -183,6 +186,13 @@ endif
|
||||
|
||||
#CFLAGS += -Wstack-usage=524288
|
||||
|
||||
ifeq ($(SYSTEM_LZMA_SDK),1)
|
||||
CFLAGS += $(LZMA_SDK_INCLUDE)
|
||||
LDFLAGS += -llzmasdk
|
||||
else
|
||||
CFLAGS +=-Iinclude/lzma_sdk/
|
||||
endif
|
||||
|
||||
LFLAGS := $(LDFLAGS)
|
||||
|
||||
ifeq ($(DEBUG),0)
|
||||
@ -297,7 +307,11 @@ LFLAGS_CROSS_WIN64 += -lpsapi
|
||||
## Objects
|
||||
##
|
||||
|
||||
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_lzma lzma_sdk/Alloc lzma_sdk/Lzma2Dec lzma_sdk/LzmaDec filehandling folder hashcat hashes hlfmt hwmon induct interface locking logfile loopback memory monitor mpsp opencl outfile_check outfile pidfile potfile restore rp rp_cpu rp_kernel_on_cpu rp_kernel_on_cpu_optimized selftest shared status stdout straight terminal thread timer tuningdb usage user_options wordlist
|
||||
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_lzma filehandling folder hashcat hashes hlfmt hwmon induct interface locking logfile loopback memory monitor mpsp opencl outfile_check outfile pidfile potfile restore rp rp_cpu rp_kernel_on_cpu rp_kernel_on_cpu_optimized selftest shared status stdout straight terminal thread timer tuningdb usage user_options wordlist
|
||||
|
||||
ifeq ($(SYSTEM_LZMA_SDK),0)
|
||||
OBJS_ALL += lzma_sdk/Alloc lzma_sdk/Lzma2Dec lzma_sdk/LzmaDec
|
||||
endif
|
||||
|
||||
NATIVE_STATIC_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).NATIVE.STATIC.o)
|
||||
NATIVE_SHARED_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).NATIVE.SHARED.o)
|
||||
|
Loading…
Reference in New Issue
Block a user