LUALIB = ../liblua/liblua.a
LDFLAGS = $(ENV_LDFLAGS)
CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../zlib -I../uart -I/opt/local/include -I../liblua -Wall -g -O3
-CXXFLAGS = -I../include -I../uart -Wall -O3
+CXXFLAGS = -I../include -Wall -O3
LUAPLATFORM = generic
platform = $(shell uname)
CORESRCS = uart_posix.c \
uart_win32.c \
util.c \
- util_posix.c \
- comms.c \
- data.c \
- ui.c
+ util_posix.c
CMDSRCS = crapto1/crapto1.c\
crapto1/crypto1.c\
crc64.c \
iso14443crc.c \
iso15693tools.c \
+ data.c \
graph.c \
+ ui.c \
cmddata.c \
lfdemod.c \
+ emv/apduinfo.c\
+ emv/dump.c\
+ emv/tlv.c\
+ emv/emv_tags.c\
+ emv/dol.c\
+ emv/emvcore.c\
+ emv/cmdemv.c\
cmdhf.c \
cmdhf14a.c \
cmdhf14b.c \
#-DDEBUG -Dverbose=1
QTGUISRCS = proxgui.cpp proxguiqt.cpp proxguiqt.moc.cpp guidummy.cpp
-NOGUISRCS = guidummy.cpp
COREOBJS = $(CORESRCS:%.c=$(OBJDIR)/%.o)
CMDOBJS = $(CMDSRCS:%.c=$(OBJDIR)/%.o)
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX.o) \
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX2.o)
-GCC_VERSION := $(shell gcc --version | awk '/gcc/{print $$NF;}' | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/')
-CLANG_VERSION := $(shell gcc --version | awk '/Apple LLVM version/{print $$4;}' | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/')
-ifneq ($(CLANG_VERSION), )
- SUPPORTS_AVX512 := $(shell [ $(CLANG_VERSION) -ge 80000 ] && echo "True" )
-endif
-ifneq ($(GCC_VERSION), )
- SUPPORTS_AVX512 := $(shell [ $(GCC_VERSION) -ge 40900 ] && echo "True" )
-endif
+SUPPORTS_AVX512 := $(shell echo | gcc -E -mavx512f - &> /dev/null && echo "True" )
HARD_SWITCH_NOSIMD = -mno-mmx -mno-sse2 -mno-avx -mno-avx2
HARD_SWITCH_MMX = -mmmx -mno-sse2 -mno-avx -mno-avx2
HARD_SWITCH_SSE2 = -mmmx -msse2 -mno-avx -mno-avx2