2022-01-27 02:57:10 +08:00
|
|
|
MYSRCPATHS = ../../common ../../common/mbedtls
|
2022-02-17 04:44:06 +08:00
|
|
|
MYSRCS = util_posix.c randoms.c
|
2022-01-27 02:57:10 +08:00
|
|
|
MYINCLUDES = -I../../include -I../../common -I../../common/mbedtls
|
2022-02-04 01:35:29 +08:00
|
|
|
MYCFLAGS = -march=native -Ofast
|
2022-01-27 02:57:10 +08:00
|
|
|
MYDEFS =
|
|
|
|
MYLDLIBS = -lcrypto
|
2022-01-29 18:31:18 +08:00
|
|
|
|
2022-01-27 02:57:10 +08:00
|
|
|
ifneq ($(SKIPPTHREAD),1)
|
2022-01-29 18:31:18 +08:00
|
|
|
MYLDLIBS += -lpthread
|
2022-01-27 02:57:10 +08:00
|
|
|
endif
|
|
|
|
|
2022-02-17 04:44:06 +08:00
|
|
|
BINS = brute_key mfd_aes_brute mfd_multi_brute
|
2022-01-27 02:57:10 +08:00
|
|
|
INSTALLTOOLS = $(BINS)
|
|
|
|
|
|
|
|
include ../../Makefile.host
|
|
|
|
|
|
|
|
# checking platform can be done only after Makefile.host
|
|
|
|
ifneq (,$(findstring MINGW,$(platform)))
|
|
|
|
# Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z)
|
|
|
|
# and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1
|
2022-01-29 18:31:18 +08:00
|
|
|
MYCFLAGS += -D_ISOC99_SOURCE
|
|
|
|
endif
|
|
|
|
|
|
|
|
# OS X needs linking to openssl
|
2022-01-31 17:08:17 +08:00
|
|
|
ifeq ($(USE_BREW),1)
|
2022-02-28 23:02:13 +08:00
|
|
|
MYCFLAGS += -I$(BREW_PREFIX)/opt/openssl@3/include -I$(BREW_PREFIX)/opt/openssl@1.1/include
|
2022-01-31 17:08:17 +08:00
|
|
|
MYLDFLAGS += -L$(BREW_PREFIX)/opt/openssl@3/lib -L$(BREW_PREFIX)/opt/openssl@1.1/lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(USE_MACPORTS),1)
|
2022-02-28 23:14:53 +08:00
|
|
|
MYCFLAGS += -I$(MACPORTS_PREFIX)/include/openssl-3 -I$(MACPORTS_PREFIX)/include/openssl-1.1
|
2022-01-31 17:08:17 +08:00
|
|
|
MYLDFLAGS += -L$(MACPORTS_PREFIX)/lib/openssl-3 -L$(MACPORTS_PREFIX)/lib/openssl-1.1
|
2022-01-27 02:57:10 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
brute_key : $(OBJDIR)/brute_key.o $(MYOBJS)
|
|
|
|
|
|
|
|
mfd_aes_brute : $(OBJDIR)/mfd_aes_brute.o $(MYOBJS)
|
2022-02-17 04:44:06 +08:00
|
|
|
|
|
|
|
mfd_multi_brute : $(OBJDIR)/mfd_multi_brute.o $(MYOBJS)
|