mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-22 15:16:19 +08:00
update cmakefile for lib
This commit is contained in:
parent
8172c708c3
commit
623f809ffe
3 changed files with 23 additions and 9 deletions
|
@ -237,8 +237,8 @@ set (TARGET_SOURCES
|
|||
${PM3_ROOT}/client/src/cmdhf14b.c
|
||||
${PM3_ROOT}/client/src/cmdhf15.c
|
||||
${PM3_ROOT}/client/src/cmdhfcryptorf.c
|
||||
${PM3_ROOT}/client/src/cmdhfepa.c
|
||||
${PM3_ROOT}/client/src/cmdhfemrtd.c
|
||||
${PM3_ROOT}/client/src/cmdhfepa.c
|
||||
${PM3_ROOT}/client/src/cmdhffelica.c
|
||||
${PM3_ROOT}/client/src/cmdhffido.c
|
||||
${PM3_ROOT}/client/src/cmdhficlass.c
|
||||
|
|
|
@ -32,7 +32,7 @@ find_package(PkgConfig)
|
|||
if (NOT SKIPQT EQUAL 1)
|
||||
if(APPLE AND EXISTS /usr/local/opt/qt5)
|
||||
# Homebrew installs Qt5 (up to at least 5.11.0) in
|
||||
# /usr/local/qt5. Ensure that it can be found by CMake
|
||||
# /usr/local/opt/qt5. Ensure that it can be found by CMake
|
||||
# since it is not in the default /usr/local prefix.
|
||||
# Add it to PATHS so that it doesn't override the
|
||||
# CMAKE_PREFIX_PATH environment variable.
|
||||
|
@ -40,6 +40,16 @@ if (NOT SKIPQT EQUAL 1)
|
|||
# e.g. find_package(Qt5Core ${QT_FIND_PACKAGE_OPTIONS})
|
||||
list(APPEND QT_FIND_PACKAGE_OPTIONS PATHS /usr/local/opt/qt5)
|
||||
endif(APPLE AND EXISTS /usr/local/opt/qt5)
|
||||
if(APPLE AND EXISTS /opt/homebrew/opt/qt5)
|
||||
# Homebrew on Apple Silicon installs Qt5 in
|
||||
# /opt/homebrew/opt/qt5. Ensure that it can be found by CMake
|
||||
# since it is not in the default /usr/local prefix.
|
||||
# Add it to PATHS so that it doesn't override the
|
||||
# CMAKE_PREFIX_PATH environment variable.
|
||||
# QT_FIND_PACKAGE_OPTIONS should be passed to find_package,
|
||||
# e.g. find_package(Qt5Core ${QT_FIND_PACKAGE_OPTIONS})
|
||||
list(APPEND QT_FIND_PACKAGE_OPTIONS PATHS /opt/homebrew/opt/qt5)
|
||||
endif(APPLE AND EXISTS /opt/homebrew/opt/qt5)
|
||||
set(QT_PACKAGELIST
|
||||
Qt5Core
|
||||
Qt5Widgets
|
||||
|
@ -77,12 +87,12 @@ endif (EMBED_READLINE OR EMBED_BZIP2)
|
|||
|
||||
if (NOT SKIPREADLINE EQUAL 1)
|
||||
if (APPLE)
|
||||
find_path(READLINE_INCLUDE_DIRS readline/readline.h /usr/local/opt/readline/include /opt/local/include /opt/include /usr/local/include /usr/include NO_DEFAULT_PATH)
|
||||
find_library(READLINE_LIBRARIES readline /usr/local/opt/readline/lib /opt/local/lib /opt/lib /usr/local/lib /usr/lib NO_DEFAULT_PATH)
|
||||
find_path(READLINE_INCLUDE_DIRS readline/readline.h /usr/local/opt/readline/include /opt/local/include /opt/include /usr/local/include /usr/include /opt/homebrew/opt/readline/include NO_DEFAULT_PATH)
|
||||
find_library(READLINE_LIBRARIES readline /usr/local/opt/readline/lib /opt/local/lib /opt/lib /usr/local/lib /usr/lib /opt/homebrew/opt/readline/lib NO_DEFAULT_PATH)
|
||||
endif (APPLE)
|
||||
if (EMBED_READLINE)
|
||||
ExternalProject_Add(ncurses
|
||||
URL http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
|
||||
URL http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz
|
||||
PREFIX deps/ncurses
|
||||
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/ncurses
|
||||
CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} LD=${CMAKE_C_COMPILER} AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} ${CFLAGS_EXTERNAL_LIB} --host=arm --disable-database --with-fallbacks=ansi-generic,ansi-mini,color_xterm,dtterm,dumb,Eterm,Eterm-256color,Eterm-88color,eterm-color,gnome,gnome-256color,guru,hurd,iTerm.app,konsole,konsole-16color,konsole-256color,konsole-base,konsole-linux,konsole-solaris,konsole-vt100,kterm,kterm-color,linux,linux-16color,linux-basic,mac,mlterm,mlterm-256color,mrxvt,mrxvt-256color,mterm,mterm-ansi,mvterm,nsterm,nsterm-16color,nsterm-256color,pty,putty,putty-256color,putty-vt100,rxvt,rxvt-16color,rxvt-256color,rxvt-88color,rxvt-basic,rxvt-color,screen,screen-16color,screen-256color,simpleterm,st-16color,st-256color,st52,st52-color,stv52,tt,tt52,unknown,vt100,vt102,vte,vte-256color,xterm,xterm-16color,xterm-256color,xterm-88color,xterm-basic,xterm-bold,xterm-color,xterm-utf8,xterm-vt220,xterm-vt52,xterm1,xtermc,xtermm --enable-termcap --without-ada --without-debug --without-dlsym --without-gpm --without-develop --without-tests --without-cxx-binding --with-termlib
|
||||
|
@ -94,7 +104,7 @@ if (NOT SKIPREADLINE EQUAL 1)
|
|||
ExternalProject_Add_StepTargets(ncurses configure build install)
|
||||
|
||||
ExternalProject_Add(readline
|
||||
URL ftp://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz
|
||||
URL ftp://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz
|
||||
PREFIX deps/readline
|
||||
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/readline
|
||||
CONFIGURE_COMMAND ./configure CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} LD=${CMAKE_C_COMPILER} AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} ${CFLAGS_EXTERNAL_LIB} --host=arm --enable-static
|
||||
|
@ -227,10 +237,12 @@ set (TARGET_SOURCES
|
|||
${PM3_ROOT}/client/src/cmdhf14b.c
|
||||
${PM3_ROOT}/client/src/cmdhf15.c
|
||||
${PM3_ROOT}/client/src/cmdhfcryptorf.c
|
||||
${PM3_ROOT}/client/src/cmdhfemrtd.c
|
||||
${PM3_ROOT}/client/src/cmdhfepa.c
|
||||
${PM3_ROOT}/client/src/cmdhffelica.c
|
||||
${PM3_ROOT}/client/src/cmdhffido.c
|
||||
${PM3_ROOT}/client/src/cmdhficlass.c
|
||||
${PM3_ROOT}/client/src/cmdhfjooki.c
|
||||
${PM3_ROOT}/client/src/cmdhflegic.c
|
||||
${PM3_ROOT}/client/src/cmdhflist.c
|
||||
${PM3_ROOT}/client/src/cmdhflto.c
|
||||
|
@ -248,9 +260,11 @@ set (TARGET_SOURCES
|
|||
${PM3_ROOT}/client/src/cmdlfawid.c
|
||||
${PM3_ROOT}/client/src/cmdlfcotag.c
|
||||
${PM3_ROOT}/client/src/cmdlfdestron.c
|
||||
${PM3_ROOT}/client/src/cmdlfem4x.c
|
||||
${PM3_ROOT}/client/src/cmdlfem.c
|
||||
${PM3_ROOT}/client/src/cmdlfem410x.c
|
||||
${PM3_ROOT}/client/src/cmdlfem4x05.c
|
||||
${PM3_ROOT}/client/src/cmdlfem4x50.c
|
||||
${PM3_ROOT}/client/src/cmdlfem4x70.c
|
||||
${PM3_ROOT}/client/src/cmdlffdxb.c
|
||||
${PM3_ROOT}/client/src/cmdlfgallagher.c
|
||||
${PM3_ROOT}/client/src/cmdlfguard.c
|
||||
|
@ -425,7 +439,7 @@ if (SKIPPYTHON EQUAL 1)
|
|||
else (SKIPPYTHON EQUAL 1)
|
||||
if (PYTHON3EMBED_FOUND)
|
||||
message(STATUS "Python3 library: Python3 embed found, enabled")
|
||||
elseif (PYTHON_FOUND)
|
||||
elseif (PYTHON3_FOUND)
|
||||
message(STATUS "Python3 library: Python3 found, enabled")
|
||||
else (PYTHON3EMBED_FOUND)
|
||||
message(STATUS "Python3 library: Python3 not found, disabled")
|
||||
|
|
|
@ -4,7 +4,7 @@ import pm3
|
|||
from output_grabber import OutputGrabber
|
||||
|
||||
out = OutputGrabber()
|
||||
p=pm3.pm3("/dev/ttyACM1")
|
||||
p=pm3.pm3("/dev/ttyACM0")
|
||||
print("Device:", p.name)
|
||||
with out:
|
||||
p.console("hw status")
|
||||
|
|
Loading…
Reference in a new issue