Merge branch 'master' of github.com:RfidResearchGroup/proxmark3
[RRG-proxmark3.git] / tools / mfkey / Makefile
blobd5b14f1a3289e1ebd4b336c491dc04545444f617
1 MYSRCPATHS = ../../common ../../common/crapto1
2 MYSRCS = crypto1.c crapto1.c bucketsort.c nested_util.c
3 MYINCLUDES = -I../../include -I../../common
4 MYCFLAGS = -O3
5 MYDEFS =
7 BINS = mfkey32 mfkey32v2 mfkey64 staticnested
8 INSTALLTOOLS = $(BINS)
10 include ../../Makefile.host
12 # nested_util.c needs pthread support. Older glibc needs it externally
13 ifneq ($(SKIPPTHREAD),1)
14 MYLDLIBS += -lpthread
15 endif
17 # checking platform can be done only after Makefile.host
18 ifneq (,$(findstring MINGW,$(platform)))
19 # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z)
20 # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1
21 CFLAGS += -D_ISOC99_SOURCE
22 endif
24 # macOS doesn't like these compiler params
25 ifneq ($(platform),Darwin)
26 MYCFLAGS += --param max-completely-peeled-insns=1000 --param max-completely-peel-times=10000
27 endif
29 mfkey32 : $(OBJDIR)/mfkey32.o $(MYOBJS)
30 mfkey32v2 : $(OBJDIR)/mfkey32v2.o $(MYOBJS)
31 mfkey64 : $(OBJDIR)/mfkey64.o $(MYOBJS)
32 staticnested : $(OBJDIR)/staticnested.o $(MYOBJS)