mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
chg: the lualib file mf_default_keys.lua is now automatically created with "make clean && make all".
This commit is contained in:
+5
-2
@@ -213,7 +213,7 @@ endif
|
||||
|
||||
BINS = proxmark3 flasher fpga_compress
|
||||
WINBINS = $(patsubst %, %.exe, $(BINS))
|
||||
CLEAN = $(BINS) $(WINBINS) $(COREOBJS) $(CMDOBJS) $(ZLIBOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(OBJDIR)/*.o *.moc.cpp ui/ui_overlays.h lualibs/usb_cmd.lua
|
||||
CLEAN = $(BINS) $(WINBINS) $(COREOBJS) $(CMDOBJS) $(ZLIBOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(OBJDIR)/*.o *.moc.cpp ui/ui_overlays.h lualibs/usb_cmd.lua lualibs/mf_default_keys.lua
|
||||
|
||||
# need to assign dependancies to build these first...
|
||||
all: lua_build $(BINS)
|
||||
@@ -222,7 +222,7 @@ all-static: LDLIBS:=-static $(LDLIBS)
|
||||
all-static: proxmark3 flasher fpga_compress
|
||||
|
||||
proxmark3: LDLIBS+=$(LUALIB) $(QTLDLIBS)
|
||||
proxmark3: $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(ZLIBOBJS) lualibs/usb_cmd.lua
|
||||
proxmark3: $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(ZLIBOBJS) lualibs/usb_cmd.lua lualibs/mf_default_keys.lua
|
||||
$(LD) $(LDFLAGS) $(OBJDIR)/proxmark3.o $(COREOBJS) $(CMDOBJS) $(QTGUIOBJS) $(MULTIARCHOBJS) $(ZLIBOBJS) $(LDLIBS) -o $@
|
||||
|
||||
flasher: $(OBJDIR)/flash.o $(OBJDIR)/flasher.o $(COREOBJS)
|
||||
@@ -241,6 +241,9 @@ ui/ui_overlays.h: ui/overlays.ui
|
||||
|
||||
lualibs/usb_cmd.lua: ../include/usb_cmd.h
|
||||
awk -f usb_cmd_h2lua.awk $^ > $@
|
||||
|
||||
lualibs/mf_default_keys.lua : default_keys.dic
|
||||
awk -f default_keys_dic2lua.awk $^ > $@
|
||||
|
||||
clean:
|
||||
$(RM) $(CLEAN)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
BEGIN {
|
||||
print "--[["
|
||||
print "These are default_keys dictionary"
|
||||
print "This file is automatically generated from default_keys.h - DON'T EDIT MANUALLY."
|
||||
print "--]]"
|
||||
print "local _keys = {"
|
||||
}
|
||||
|
||||
$1 ~ /^[A-Fa-f0-9]+/ { sub(/\r/, ""); print "'"substr($1,0,12)"'," }
|
||||
|
||||
END {
|
||||
print "}"
|
||||
|
||||
print "---"
|
||||
print "-- The keys above have just been pasted in, for completeness sake. They contain duplicates. "
|
||||
print "-- We need to weed the duplicates out before we expose the list to someone who actually wants to use them"
|
||||
print "-- @param list a list to do 'uniq' on"
|
||||
print ""
|
||||
print "local function uniq(list)"
|
||||
print ""
|
||||
print " local foobar = {}"
|
||||
print " for _, value in pairs(list) do"
|
||||
print " value = value:lower()"
|
||||
print " if not foobar[value] then"
|
||||
print " foobar[value] = true"
|
||||
print " table.insert(foobar, value);"
|
||||
print " end"
|
||||
print " end"
|
||||
print " return foobar"
|
||||
print "end"
|
||||
print "return uniq(_keys)"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user