mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
rework standalone makefile
This commit is contained in:
parent
6888a0f7f2
commit
e98c4e246d
4 changed files with 54 additions and 34 deletions
|
@ -19,6 +19,9 @@ ifeq ($(PLTNAME),)
|
||||||
ifneq ($(PLATFORM_EXTRAS),)
|
ifneq ($(PLATFORM_EXTRAS),)
|
||||||
${info using saved PLATFORM_EXTRAS: '$(PLATFORM_EXTRAS)'}
|
${info using saved PLATFORM_EXTRAS: '$(PLATFORM_EXTRAS)'}
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(STANDALONE),)
|
||||||
|
${info using saved STANDALONE: '$(STANDALONE)'}
|
||||||
|
endif
|
||||||
include ../common/Makefile.hal
|
include ../common/Makefile.hal
|
||||||
$(info ===================================================================)
|
$(info ===================================================================)
|
||||||
$(info Platform name: $(PLTNAME))
|
$(info Platform name: $(PLTNAME))
|
||||||
|
|
|
@ -60,17 +60,18 @@ This leads to your next step, your DEFINE name needed in Makefile.
|
||||||
|
|
||||||
## Update COMMON/MAKEFILE.HAL
|
## Update COMMON/MAKEFILE.HAL
|
||||||
|
|
||||||
Add your suggested DEFINE to the samples of directive flag provided in the `common/Makefile.hal`.
|
Add your mode to the `common/Makefile.hal` help and modes list:
|
||||||
```
|
```
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_LF_SAMYRUN
|
+==========================================================+
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_LF_ICERUN
|
| STANDALONE | DESCRIPTION |
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_LF_PROXBRUTE
|
+==========================================================+
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_LF_HIDBRUTE
|
...
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_YOUNG
|
+----------------------------------------------------------+
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_MATTYRUN
|
| LF_FOO | My foobar mode will make you coffee |
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_COLIN
|
+----------------------------------------------------------+
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_BOG
|
|
||||||
#PLATFORM_DEFS += -DWITH_STANDALONE_LF_FOO
|
STANDALONE_MODES := LF_SAMYRUN LF_ICERUN LF_PROXBRUTE LF_HIDBRUTE LF_FOO
|
||||||
|
STANDALONE_MODES += HF_YOUNG HF_MATTYRUN HF_COLIN HF_BOG
|
||||||
```
|
```
|
||||||
|
|
||||||
## Update ARMSRC/MAKEFILE
|
## Update ARMSRC/MAKEFILE
|
||||||
|
|
|
@ -15,6 +15,9 @@ ifeq ($(PLTNAME),)
|
||||||
ifneq ($(PLATFORM_EXTRAS),)
|
ifneq ($(PLATFORM_EXTRAS),)
|
||||||
${info using saved PLATFORM_EXTRAS: '$(PLATFORM_EXTRAS)'}
|
${info using saved PLATFORM_EXTRAS: '$(PLATFORM_EXTRAS)'}
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(STANDALONE),)
|
||||||
|
${info using saved STANDALONE: '$(STANDALONE)'}
|
||||||
|
endif
|
||||||
include ../common/Makefile.hal
|
include ../common/Makefile.hal
|
||||||
$(info ===================================================================)
|
$(info ===================================================================)
|
||||||
$(info Platform name: $(PLTNAME))
|
$(info Platform name: $(PLTNAME))
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define KNOWN_PLATFORMS
|
define KNOWN_DEFINITIONS
|
||||||
|
|
||||||
|
Known definitions:
|
||||||
|
|
||||||
+==========================================================+
|
+==========================================================+
|
||||||
| PLATFORM | DESCRIPTION |
|
| PLATFORM | DESCRIPTION |
|
||||||
|
@ -22,18 +24,40 @@ define KNOWN_PLATFORMS
|
||||||
| BTADDON | Proxmark3 rdv4 BT add-on |
|
| BTADDON | Proxmark3 rdv4 BT add-on |
|
||||||
+----------------------------------------------------------+
|
+----------------------------------------------------------+
|
||||||
|
|
||||||
Options to define platform:
|
+==========================================================+
|
||||||
(1) Run make with PLATFORM specified as follows:
|
| STANDALONE | DESCRIPTION |
|
||||||
make PLATFORM=PM3EASY
|
+==========================================================+
|
||||||
|
| (none: def) | By default no standalone mode |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
| LF_SAMYRUN | |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
| LF_ICERUN | |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
| LF_PROXBRUTE | |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
| LF_HIDBRUTE | |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
| HF_YOUNG | |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
| HF_MATTYRUN | |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
| HF_COLIN | |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
| HF_BOG | |
|
||||||
|
+----------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
Options to define platform, platform extras and/or standalone mode:
|
||||||
|
(1) Run make with PLATFORM, PLATFORM_EXTRAS and/or STANDALONE as follows:
|
||||||
|
make PLATFORM=PM3EASY STANDALONE=LF_SAMYRUN
|
||||||
|
|
||||||
(2) Save a file called Makefile.platform with contents:
|
(2) Save a file called Makefile.platform with contents:
|
||||||
PLATFORM=PM3EASY
|
PLATFORM=PM3EASY
|
||||||
|
STANDALONE=LF_SAMYRUN
|
||||||
|
|
||||||
or if you have a Proxmark 3 RDV4 with the BT add-on:
|
or if you have a Proxmark 3 RDV4 with the BT add-on:
|
||||||
PLATFORM=PM3RDV4
|
PLATFORM=PM3RDV4
|
||||||
PLATFORM_EXTRAS=BTADDON
|
PLATFORM_EXTRAS=BTADDON
|
||||||
|
|
||||||
Option to choose standalone mode, e.g. LF_SAMYRUN
|
|
||||||
STANDALONE=LF_SAMYRUN
|
STANDALONE=LF_SAMYRUN
|
||||||
|
|
||||||
!! Make sure to "make clean" when you change platform settings !!
|
!! Make sure to "make clean" when you change platform settings !!
|
||||||
|
@ -62,7 +86,7 @@ else ifeq ($(PLATFORM),PM3OLD512)
|
||||||
MCU = AT91SAM7S512
|
MCU = AT91SAM7S512
|
||||||
PLTNAME = Proxmark3 V1 with AT91SAM7S512
|
PLTNAME = Proxmark3 V1 with AT91SAM7S512
|
||||||
else
|
else
|
||||||
$(error Invalid or empty PLATFORM: $(PLATFORM). Known platforms: $(KNOWN_PLATFORMS))
|
$(error Invalid or empty PLATFORM: $(PLATFORM). $(KNOWN_DEFINITIONS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# parsing additional PLATFORM_EXTRAS tokens
|
# parsing additional PLATFORM_EXTRAS tokens
|
||||||
|
@ -95,23 +119,12 @@ PLATFORM_DEFS += \
|
||||||
-DWITH_HFSNIFF
|
-DWITH_HFSNIFF
|
||||||
|
|
||||||
# Standalone mode
|
# Standalone mode
|
||||||
# !! Choose only one !!
|
STANDALONE_MODES := LF_SAMYRUN LF_ICERUN LF_PROXBRUTE LF_HIDBRUTE
|
||||||
ifneq (,$(findstring LF_ICERUN,$(STANDALONE)))
|
STANDALONE_MODES += HF_YOUNG HF_MATTYRUN HF_COLIN HF_BOG
|
||||||
PLATFORM_DEFS += -DWITH_STANDALONE_LF_ICERUN
|
ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES)),)
|
||||||
else ifneq (,$(findstring LF_PROXBRUTE,$(STANDALONE)))
|
PLATFORM_DEFS += -DWITH_STANDALONE_$(STANDALONE)
|
||||||
PLATFORM_DEFS += -DWITH_STANDALONE_LF_PROXBRUTE
|
else ifneq ($(STANDALONE),)
|
||||||
else ifneq (,$(findstring LF_HIDBRUTE,$(STANDALONE)))
|
$(error Invalid STANDALONE: $(STANDALONE). $(KNOWN_DEFINITIONS))
|
||||||
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
|
endif
|
||||||
|
|
||||||
$(info $(findstring WITH_STANDALONE_*,$(PLATFORM_DEFS)))
|
$(info $(findstring WITH_STANDALONE_*,$(PLATFORM_DEFS)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue