From 53e48d70cd708b922aaab274a45aa93a025f3d66 Mon Sep 17 00:00:00 2001 From: Fl0-0 Date: Fri, 31 May 2019 14:44:32 +0200 Subject: [PATCH] Makefile platform option for standalone mode Signed-off-by: Fl0-0 --- Makefile.platform.sample | 1 + common/Makefile.hal | 28 ++++++++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Makefile.platform.sample b/Makefile.platform.sample index 8ef572461..217cdccc6 100644 --- a/Makefile.platform.sample +++ b/Makefile.platform.sample @@ -1,3 +1,4 @@ # If you want to use it, copy this file as Makefile.platform and adjust it to your needs PLATFORM=PM3RDV4 #PLATFORM_EXTRAS=BTADDON +#STANDALONE=HF_COLIN diff --git a/common/Makefile.hal b/common/Makefile.hal index 58eddb86e..3f7727730 100644 --- a/common/Makefile.hal +++ b/common/Makefile.hal @@ -33,6 +33,9 @@ or if you have a Proxmark 3 RDV4 with the BT add-on: PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON +Option to choose standalone mode, e.g. HF_COLIN +SANDALONE=HF_COLIN + !! Make sure to "make clean" when you change platform settings !! endef @@ -93,14 +96,23 @@ PLATFORM_DEFS += \ # Standalone mode # !! Choose only one !! -PLATFORM_DEFS += -DWITH_STANDALONE_LF_SAMYRUN -#PLATFORM_DEFS += -DWITH_STANDALONE_LF_ICERUN -#PLATFORM_DEFS += -DWITH_STANDALONE_LF_PROXBRUTE -#PLATFORM_DEFS += -DWITH_STANDALONE_LF_HIDBRUTE -#PLATFORM_DEFS += -DWITH_STANDALONE_HF_YOUNG -#PLATFORM_DEFS += -DWITH_STANDALONE_HF_MATTYRUN -#PLATFORM_DEFS += -DWITH_STANDALONE_HF_COLIN -#PLATFORM_DEFS += -DWITH_STANDALONE_HF_BOG +ifneq (,$(findstring LF_ICERUN,$(STANDALONE))) + PLATFORM_DEFS += -DWITH_STANDALONE_LF_ICERUN +else ifneq (,$(findstring LF_PROXBRUTE,$(STANDALONE))) + PLATFORM_DEFS += -DWITH_STANDALONE_LF_PROXBRUTE +else ifneq (,$(findstring LF_HIDBRUTE,$(STANDALONE))) + PLATFORM_DEFS += -DWITH_STANDALONE_LF_HIDBRUTE +else ifneq (,$(findstring HF_YOUNG,$(STANDALONE))) + PLATFORM_DEFS += -DWITH_STANDALONE_HF_YOUNG +else ifneq (,$(findstring HF_MATTYRUN,$(STANDALONE))) + PLATFORM_DEFS += -DWITH_STANDALONE_HF_MATTYRUN +else ifneq (,$(findstring HF_COLIN,$(STANDALONE))) + PLATFORM_DEFS += -DWITH_STANDALONE_HF_COLIN +else ifneq (,$(findstring HF_BOG,$(STANDALONE))) + PLATFORM_DEFS += -DWITH_STANDALONE_HF_BOG +else + PLATFORM_DEFS += -DWITH_STANDALONE_LF_SAMYRUN +endif $(info $(findstring WITH_STANDALONE_*,$(PLATFORM_DEFS)))