From: marshmellow42 Date: Sun, 4 Jun 2017 23:53:28 +0000 (-0400) Subject: Merge pull request #302 from pwpiwi/fix_QtThreads X-Git-Tag: v3.0.0 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/b7f68fda6b8dc2c1c803d5c471388d7263c6fa0a?hp=-c Merge pull request #302 from pwpiwi/fix_QtThreads fixing the crash on exit (issue #284) --- c2ca50419d360dc80196fba5a4e39c33ef4d1a97 diff --combined client/Makefile index 864ab546,89f97e52..3ac0beba --- a/client/Makefile +++ b/client/Makefile @@@ -20,7 -20,7 +20,7 @@@ LDLIBS = -L/opt/local/lib -L/usr/local/ LUALIB = ../liblua/liblua.a LDFLAGS = $(COMMON_FLAGS) CFLAGS = -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O3 - CXXFLAGS = -Wall -O3 + CXXFLAGS = -I../include -Wall -O3 LUAPLATFORM = generic platform = $(shell uname) @@@ -112,8 -112,6 +112,8 @@@ CMDSRCS = crapto1/crapto1.c cmdhficlass.c \ cmdhfmf.c \ cmdhfmfu.c \ + cmdhfmfhard.c \ + hardnested/hardnested_bruteforce.c \ cmdhftopaz.c \ cmdhw.c \ cmdlf.c \ @@@ -155,8 -153,6 +155,8 @@@ reveng/poly.c\ reveng/getopt.c\ +MULTIARCHSRCS = hardnested/hardnested_bf_core.c hardnested/hardnested_bitarray_core.c + ZLIBSRCS = deflate.c adler32.c trees.c zutil.c inflate.c inffast.c inftrees.c ZLIBFLAGS = -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED #-DDEBUG -Dverbose=1 @@@ -166,16 -162,10 +166,16 @@@ QTGUISRCS = proxgui.cpp proxguiqt.cpp p COREOBJS = $(CORESRCS:%.c=$(OBJDIR)/%.o) CMDOBJS = $(CMDSRCS:%.c=$(OBJDIR)/%.o) ZLIBOBJS = $(ZLIBSRCS:%.c=$(OBJDIR)/%.o) - +MULTIARCHOBJS = $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \ + $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_MMX.o) \ + $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_SSE2.o) \ + $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX.o) \ + $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX2.o) \ + $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX512.o) + BINS = proxmark3 flasher fpga_compress WINBINS = $(patsubst %, %.exe, $(BINS)) -CLEAN = $(BINS) $(WINBINS) $(COREOBJS) $(CMDOBJS) $(ZLIBOBJS) $(QTGUIOBJS) $(OBJDIR)/*.o *.moc.cpp ui/ui_overlays.h +CLEAN = $(BINS) $(WINBINS) $(COREOBJS) $(CMDOBJS) $(ZLIBOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(OBJDIR)/*.o *.moc.cpp ui/ui_overlays.h # need to assign dependancies to build these first... all: ui/ui_overlays.h lua_build $(BINS) @@@ -184,8 -174,8 +184,8 @@@ all-static: LDLIBS:=-static $(LDLIBS all-static: proxmark3 flasher fpga_compress proxmark3: LDLIBS+=$(LUALIB) $(QTLDLIBS) -proxmark3: $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) lualibs/usb_cmd.lua - $(LD) $(LDFLAGS) $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(LDLIBS) -o $@ +proxmark3: $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) lualibs/usb_cmd.lua + $(LD) $(LDFLAGS) $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(LDLIBS) -o $@ flasher: $(OBJDIR)/flash.o $(OBJDIR)/flasher.o $(COREOBJS) $(LD) $(LDFLAGS) $^ $(LDLIBS) -o $@ @@@ -215,24 -205,6 +215,24 @@@ lua_build .PHONY: all clean +$(OBJDIR)/%_NOSIMD.o : %.c $(OBJDIR)/%.d + $(CC) $(DEPFLAGS) $(CFLAGS) -mno-mmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f -c -o $@ $< + +$(OBJDIR)/%_MMX.o : %.c $(OBJDIR)/%.d + $(CC) $(DEPFLAGS) $(CFLAGS) -mmmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f -c -o $@ $< + +$(OBJDIR)/%_SSE2.o : %.c $(OBJDIR)/%.d + $(CC) $(DEPFLAGS) $(CFLAGS) -mmmx -msse2 -mno-avx -mno-avx2 -mno-avx512f -c -o $@ $< + +$(OBJDIR)/%_AVX.o : %.c $(OBJDIR)/%.d + $(CC) $(DEPFLAGS) $(CFLAGS) -mmmx -msse2 -mavx -mno-avx2 -mno-avx512f -c -o $@ $< + +$(OBJDIR)/%_AVX2.o : %.c $(OBJDIR)/%.d + $(CC) $(DEPFLAGS) $(CFLAGS) -mmmx -msse2 -mavx -mavx2 -mno-avx512f -c -o $@ $< + +$(OBJDIR)/%_AVX512.o : %.c $(OBJDIR)/%.d + $(CC) $(DEPFLAGS) $(CFLAGS) -mmmx -msse2 -mavx -mavx2 -mavx512f -c -o $@ $< + %.o: %.c $(OBJDIR)/%.o : %.c $(OBJDIR)/%.d $(CC) $(DEPFLAGS) $(CFLAGS) $(ZLIBFLAGS) -c -o $@ $< @@@ -256,7 -228,7 +256,7 @@@ $(OBJDIR)/%.o : %.cpp $(OBJDIR)/%. # $(CXX) $(DEPFLAGS) $(CXXFLAGS) -c -o $@ $< # $(POSTCOMPILE) -DEPENDENCY_FILES = $(patsubst %.c, $(OBJDIR)/%.d, $(CORESRCS) $(CMDSRCS) $(ZLIBSRCS)) \ +DEPENDENCY_FILES = $(patsubst %.c, $(OBJDIR)/%.d, $(CORESRCS) $(CMDSRCS) $(ZLIBSRCS) $(MULTIARCHSRCS)) \ $(patsubst %.cpp, $(OBJDIR)/%.d, $(QTGUISRCS)) \ $(OBJDIR)/proxmark3.d $(OBJDIR)/flash.d $(OBJDIR)/flasher.d $(OBJDIR)/fpga_compress.d