Merge pull request #2593 from Akury83/master
[RRG-proxmark3.git] / tools / mfc / card_only / Makefile
blobfa705e209fb80c89deffd36b2e6d70991e76ce1d
1 ROOTPATH = ../../..
2 MYSRCPATHS = $(ROOTPATH)/common $(ROOTPATH)/common/crapto1
3 MYSRCS = crypto1.c crapto1.c bucketsort.c nested_util.c
4 MYINCLUDES = -I$(ROOTPATH)/include -I$(ROOTPATH)/common
5 MYCFLAGS = -O3
6 MYDEFS =
8 BINS = nonce2key staticnested_0nt staticnested_1nt staticnested_2nt staticnested_2x1nt_rf08s_1key staticnested_2x1nt_rf08s
10 INSTALLTOOLS = $(BINS)
12 include $(ROOTPATH)/Makefile.host
14 # nested_util.c needs pthread support. Older glibc needs it externally
15 ifneq ($(SKIPPTHREAD),1)
16 MYLDLIBS += -lpthread
17 endif
19 # checking platform can be done only after Makefile.host
20 ifneq (,$(findstring MINGW,$(platform)))
21 # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z)
22 # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1
23 CFLAGS += -D_ISOC99_SOURCE
24 endif
26 # clang doesn't like these compiler params
27 ifneq ($(DETECTED_COMPILER), clang)
28 MYCFLAGS += --param max-completely-peeled-insns=1000 --param max-completely-peel-times=10000
29 endif
31 nonce2key : $(OBJDIR)/nonce2key.o $(MYOBJS)
32 staticnested_0nt : $(OBJDIR)/staticnested_0nt.o $(MYOBJS)
33 staticnested_1nt : $(OBJDIR)/staticnested_1nt.o $(MYOBJS)
34 staticnested_2nt : $(OBJDIR)/staticnested_2nt.o $(MYOBJS)
35 staticnested_2x1nt_rf08s_1key : $(OBJDIR)/staticnested_2x1nt_rf08s_1key.o $(MYOBJS)
36 staticnested_2x1nt_rf08s : $(OBJDIR)/staticnested_2x1nt_rf08s.o $(MYOBJS)