mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
Merge pull request #1480 from linuxgemini/macports-support-add
Improve MacPorts Support
This commit is contained in:
commit
f31e94e618
3 changed files with 40 additions and 32 deletions
|
@ -34,6 +34,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac
|
||||||
- Fix - move des functions to libcrypto (@merlokk)
|
- Fix - move des functions to libcrypto (@merlokk)
|
||||||
- Added `CLIGetOptionList` to cliparser that makes it easier to implement text options in the cli (@merlokk)
|
- Added `CLIGetOptionList` to cliparser that makes it easier to implement text options in the cli (@merlokk)
|
||||||
- Added experimental support for macOS users utilizing MacPorts instead of Homebrew (@linuxgemini)
|
- Added experimental support for macOS users utilizing MacPorts instead of Homebrew (@linuxgemini)
|
||||||
|
- Added additional support for macOS users utilizing MacPorts (@linuxgemini)
|
||||||
- Added `pm3_online_check.py` - a script to verify and initialize a Proxmark3 RDV4 device (@iceman1001)
|
- Added `pm3_online_check.py` - a script to verify and initialize a Proxmark3 RDV4 device (@iceman1001)
|
||||||
|
|
||||||
## [midsummer.4.13441][2021-06-25]
|
## [midsummer.4.13441][2021-06-25]
|
||||||
|
|
|
@ -50,7 +50,8 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),Darwin)
|
ifeq ($(platform),Darwin)
|
||||||
USE_BREW = 1
|
USE_BREW ?= 1
|
||||||
|
USE_MACPORTS ?= 0
|
||||||
AR= /usr/bin/ar rcs
|
AR= /usr/bin/ar rcs
|
||||||
RANLIB= /usr/bin/ranlib
|
RANLIB= /usr/bin/ranlib
|
||||||
else
|
else
|
||||||
|
@ -61,10 +62,14 @@ endif
|
||||||
ifeq ($(USE_BREW),1)
|
ifeq ($(USE_BREW),1)
|
||||||
BREW_PREFIX = $(shell brew --prefix 2>/dev/null)
|
BREW_PREFIX = $(shell brew --prefix 2>/dev/null)
|
||||||
ifeq ($(strip $(BREW_PREFIX)),)
|
ifeq ($(strip $(BREW_PREFIX)),)
|
||||||
MACPORTS_PREFIX ?= /opt/local
|
USE_BREW = 0
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USE_MACPORTS),1)
|
||||||
|
MACPORTS_PREFIX ?= /opt/local
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(DEBUG),1)
|
ifeq ($(DEBUG),1)
|
||||||
DEFCXXFLAGS = -g -O0 -pipe
|
DEFCXXFLAGS = -g -O0 -pipe
|
||||||
DEFCFLAGS = -g -O0 -fstrict-aliasing -pipe
|
DEFCFLAGS = -g -O0 -fstrict-aliasing -pipe
|
||||||
|
|
|
@ -25,20 +25,21 @@ vpath %.dic dictionaries
|
||||||
OBJDIR = obj
|
OBJDIR = obj
|
||||||
|
|
||||||
ifeq ($(USE_BREW),1)
|
ifeq ($(USE_BREW),1)
|
||||||
ifdef MACPORTS_PREFIX
|
INCLUDES += -I$(BREW_PREFIX)/include
|
||||||
INCLUDES += -I$(MACPORTS_PREFIX)/include
|
LDLIBS += -L$(BREW_PREFIX)/lib
|
||||||
LDLIBS += -L$(MACPORTS_PREFIX)/lib
|
PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(BREW_PREFIX)/opt/qt/lib/pkgconfig
|
||||||
PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(MACPORTS_PREFIX)/lib/pkgconfig
|
PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(BREW_PREFIX)/opt/qt5/lib/pkgconfig
|
||||||
PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(MACPORTS_PREFIX)/libexec/qt/lib/pkgconfig
|
|
||||||
PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(MACPORTS_PREFIX)/libexec/qt5/lib/pkgconfig
|
|
||||||
else
|
|
||||||
INCLUDES += -I$(BREW_PREFIX)/include
|
|
||||||
LDLIBS += -L$(BREW_PREFIX)/lib
|
|
||||||
PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(BREW_PREFIX)/opt/qt/lib/pkgconfig
|
|
||||||
PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(BREW_PREFIX)/opt/qt5/lib/pkgconfig
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef ($(USE_MACPORTS),1)
|
||||||
|
INCLUDES += -I$(MACPORTS_PREFIX)/include
|
||||||
|
LDLIBS += -L$(MACPORTS_PREFIX)/lib
|
||||||
|
PKG_CONFIG_ENV := PKG_CONFIG_PATH=$(MACPORTS_PREFIX)/lib/pkgconfig
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
PM3INCLUDES =
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# local libraries #
|
# local libraries #
|
||||||
###################
|
###################
|
||||||
|
@ -120,19 +121,19 @@ MBEDTLSLIBCLIENTRELPATH = ../../client
|
||||||
# not distributed as system library
|
# not distributed as system library
|
||||||
STATICLIBS += $(AMIIBOLIB)
|
STATICLIBS += $(AMIIBOLIB)
|
||||||
LDLIBS += $(AMIIBOLIBLD)
|
LDLIBS += $(AMIIBOLIBLD)
|
||||||
INCLUDES += $(AMIIBOLIBINC)
|
PM3INCLUDES += $(AMIIBOLIBINC)
|
||||||
|
|
||||||
## Cliparser / Argtable3
|
## Cliparser / Argtable3
|
||||||
# not distributed as system library
|
# not distributed as system library
|
||||||
STATICLIBS += $(CLIPARSERLIB)
|
STATICLIBS += $(CLIPARSERLIB)
|
||||||
LDLIBS += $(CLIPARSERLIBLD)
|
LDLIBS += $(CLIPARSERLIBLD)
|
||||||
INCLUDES += $(CLIPARSERLIBINC)
|
PM3INCLUDES += $(CLIPARSERLIBINC)
|
||||||
|
|
||||||
## Hardnested
|
## Hardnested
|
||||||
# not distributed as system library
|
# not distributed as system library
|
||||||
STATICLIBS += $(HARDNESTEDLIB)
|
STATICLIBS += $(HARDNESTEDLIB)
|
||||||
LDLIBS +=$(HARDNESTEDLIBLD)
|
LDLIBS +=$(HARDNESTEDLIBLD)
|
||||||
INCLUDES += $(HARDNESTEDLIBINC)
|
PM3INCLUDES += $(HARDNESTEDLIBINC)
|
||||||
|
|
||||||
## Lua
|
## Lua
|
||||||
ifneq ($(SKIPLUASYSTEM),1)
|
ifneq ($(SKIPLUASYSTEM),1)
|
||||||
|
@ -152,7 +153,7 @@ ifneq ($(SKIPLUASYSTEM),1)
|
||||||
endif
|
endif
|
||||||
STATICLIBS += $(LUALIB)
|
STATICLIBS += $(LUALIB)
|
||||||
LDLIBS += $(LUALIBLD)
|
LDLIBS += $(LUALIBLD)
|
||||||
INCLUDES += $(LUALIBINC)
|
PM3INCLUDES += $(LUALIBINC)
|
||||||
|
|
||||||
## Jansson
|
## Jansson
|
||||||
# Jansson section needs to be after Lua to avoid interferences on macOS if a locally incompatible Lua was available, see PR 1155
|
# Jansson section needs to be after Lua to avoid interferences on macOS if a locally incompatible Lua was available, see PR 1155
|
||||||
|
@ -168,25 +169,25 @@ ifneq ($(SKIPJANSSONSYSTEM),1)
|
||||||
endif
|
endif
|
||||||
STATICLIBS += $(JANSSONLIB)
|
STATICLIBS += $(JANSSONLIB)
|
||||||
LDLIBS += $(JANSSONLIBLD)
|
LDLIBS += $(JANSSONLIBLD)
|
||||||
INCLUDES += $(JANSSONLIBINC)
|
PM3INCLUDES += $(JANSSONLIBINC)
|
||||||
|
|
||||||
## mbed TLS
|
## mbed TLS
|
||||||
# system library cannot be used because it is compiled by default without CMAC support
|
# system library cannot be used because it is compiled by default without CMAC support
|
||||||
STATICLIBS += $(MBEDTLSLIB)
|
STATICLIBS += $(MBEDTLSLIB)
|
||||||
LDLIBS += $(MBEDTLSLIBLD)
|
LDLIBS += $(MBEDTLSLIBLD)
|
||||||
INCLUDES += $(MBEDTLSLIBINC)
|
PM3INCLUDES += $(MBEDTLSLIBINC)
|
||||||
|
|
||||||
## Reveng
|
## Reveng
|
||||||
# not distributed as system library
|
# not distributed as system library
|
||||||
STATICLIBS += $(REVENGLIB)
|
STATICLIBS += $(REVENGLIB)
|
||||||
LDLIBS += $(REVENGLIBLD)
|
LDLIBS += $(REVENGLIBLD)
|
||||||
INCLUDES += $(REVENGLIBINC)
|
PM3INCLUDES += $(REVENGLIBINC)
|
||||||
|
|
||||||
## Tinycbor
|
## Tinycbor
|
||||||
# not distributed as system library
|
# not distributed as system library
|
||||||
STATICLIBS += $(TINYCBORLIB)
|
STATICLIBS += $(TINYCBORLIB)
|
||||||
LDLIBS += $(TINYCBORLIBLD)
|
LDLIBS += $(TINYCBORLIBLD)
|
||||||
INCLUDES += $(TINYCBORLIBINC)
|
PM3INCLUDES += $(TINYCBORLIBINC)
|
||||||
|
|
||||||
## Whereami
|
## Whereami
|
||||||
ifneq ($(SKIPWHEREAMISYSTEM),1)
|
ifneq ($(SKIPWHEREAMISYSTEM),1)
|
||||||
|
@ -199,7 +200,7 @@ ifneq ($(SKIPWHEREAMISYSTEM),1)
|
||||||
endif
|
endif
|
||||||
STATICLIBS += $(WHEREAMILIB)
|
STATICLIBS += $(WHEREAMILIB)
|
||||||
LDLIBS += $(WHEREAMILIBLD)
|
LDLIBS += $(WHEREAMILIBLD)
|
||||||
INCLUDES += $(WHEREAMILIBINC)
|
PM3INCLUDES += $(WHEREAMILIBINC)
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# system libraries #
|
# system libraries #
|
||||||
|
@ -227,7 +228,7 @@ ifneq ($(SKIPBT),1)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
LDLIBS += $(BTLIBLD)
|
LDLIBS += $(BTLIBLD)
|
||||||
INCLUDES += $(BTLIBINC)
|
PM3INCLUDES += $(BTLIBINC)
|
||||||
|
|
||||||
## Math
|
## Math
|
||||||
LDLIBS += -lm
|
LDLIBS += -lm
|
||||||
|
@ -258,7 +259,7 @@ ifneq ($(SKIPPYTHON),1)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
LDLIBS += $(PYTHONLIBLD)
|
LDLIBS += $(PYTHONLIBLD)
|
||||||
INCLUDES += $(PYTHONLIBINC)
|
PM3INCLUDES += $(PYTHONLIBINC)
|
||||||
|
|
||||||
## QT5 (or QT4 fallback) (optional)
|
## QT5 (or QT4 fallback) (optional)
|
||||||
ifneq ($(SKIPQT),1)
|
ifneq ($(SKIPQT),1)
|
||||||
|
@ -303,13 +304,14 @@ CXXINCLUDES += $(QTINCLUDES)
|
||||||
## Readline
|
## Readline
|
||||||
ifneq ($(SKIPREADLINE),1)
|
ifneq ($(SKIPREADLINE),1)
|
||||||
ifeq ($(USE_BREW),1)
|
ifeq ($(USE_BREW),1)
|
||||||
ifdef MACPORTS_PREFIX
|
LDLIBS += -L$(BREW_PREFIX)/opt/readline/lib
|
||||||
INCLUDES += -I$(MACPORTS_PREFIX)/include/readline
|
PM3INCLUDES += -I$(BREW_PREFIX)/opt/readline/include
|
||||||
else
|
|
||||||
LDLIBS += -L$(BREW_PREFIX)/opt/readline/lib
|
|
||||||
INCLUDES += -I$(BREW_PREFIX)/opt/readline/include
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USE_MACPORTS),1)
|
||||||
|
PM3INCLUDES += -I$(MACPORTS_PREFIX)/include/readline
|
||||||
|
endif
|
||||||
|
|
||||||
LDLIBS += -lreadline
|
LDLIBS += -lreadline
|
||||||
READLINE_FOUND = 1
|
READLINE_FOUND = 1
|
||||||
endif
|
endif
|
||||||
|
@ -331,7 +333,7 @@ endif
|
||||||
CFLAGS ?= $(DEFCFLAGS)
|
CFLAGS ?= $(DEFCFLAGS)
|
||||||
# We cannot just use CFLAGS+=... because it has impact on sub-makes if CFLAGS is defined in env:
|
# We cannot just use CFLAGS+=... because it has impact on sub-makes if CFLAGS is defined in env:
|
||||||
PM3CFLAGS = $(CFLAGS)
|
PM3CFLAGS = $(CFLAGS)
|
||||||
PM3CFLAGS += -I./src -I./include -I../include -I../common -I../common_fpga $(INCLUDES)
|
PM3CFLAGS += -I./src -I./include -I../include -I../common -I../common_fpga $(PM3INCLUDES) $(INCLUDES)
|
||||||
# WIP Testing
|
# WIP Testing
|
||||||
#PM3CFLAGS += -std=c11 -pedantic
|
#PM3CFLAGS += -std=c11 -pedantic
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue