mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 15:26:13 +08:00
Proper Makefile halting when using incompatible Standalone mode and Platform
This commit is contained in:
parent
cbdc4704ad
commit
4abb4b939f
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Add proper Makefile halting when using incompatible STANDALONE and PLATFORM vars (@doegox)
|
||||
- Add T55x7 Downlink mode support (@mwalker33)
|
||||
- Add SPIFFS Flash filesystem support (@cjbrigato)
|
||||
- Fix support for flashing 512K units with old bootrom (@slurdge/@doegox)
|
||||
|
|
|
@ -3,6 +3,7 @@ DEFAULT_STANDALONE=LF_SAMYRUN
|
|||
HELP_EXAMPLE_STANDALONE=HF_COLIN
|
||||
# (you can set explicitly STANDALONE= to disable standalone modes)
|
||||
STANDALONE?=$(DEFAULT_STANDALONE)
|
||||
STANDALONE_REQ_DEFS=
|
||||
|
||||
define KNOWN_STANDALONE_DEFINITIONS
|
||||
+==========================================================+
|
||||
|
@ -39,8 +40,16 @@ endef
|
|||
|
||||
STANDALONE_MODES := LF_SAMYRUN LF_ICERUN LF_PROXBRUTE LF_HIDBRUTE
|
||||
STANDALONE_MODES += HF_YOUNG HF_MATTYRUN HF_COLIN HF_BOG
|
||||
STANDALONE_MODES_REQ_SMARTCARD :=
|
||||
STANDALONE_MODES_REQ_FLASH := HF_COLIN HF_BOG
|
||||
ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES)),)
|
||||
STANDALONE_PLATFORM_DEFS += -DWITH_STANDALONE_$(STANDALONE)
|
||||
ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES_REQ_SMARTCARD)),)
|
||||
STANDALONE_REQ_DEFS += -DWITH_SMARTCARD
|
||||
endif
|
||||
ifneq ($(filter $(STANDALONE),$(STANDALONE_MODES_REQ_FLASH)),)
|
||||
STANDALONE_REQ_DEFS += -DWITH_FLASH
|
||||
endif
|
||||
else ifneq ($(STANDALONE),)
|
||||
$(error Invalid STANDALONE: $(STANDALONE). $(KNOWN_DEFINITIONS))
|
||||
endif
|
||||
|
|
|
@ -72,6 +72,13 @@ STANDALONE_MODES := LF_SAMYRUN LF_ICERUN LF_PROXBRUTE LF_HIDBRUTE LF_FOO
|
|||
STANDALONE_MODES += HF_YOUNG HF_MATTYRUN HF_COLIN HF_BOG
|
||||
```
|
||||
|
||||
If your mode is using one of the unique features of the RDV4, add it to the proper list:
|
||||
|
||||
```
|
||||
STANDALONE_MODES_REQ_SMARTCARD :=
|
||||
STANDALONE_MODES_REQ_FLASH := HF_COLIN HF_BOG
|
||||
```
|
||||
|
||||
## Update MAKEFILE.INC
|
||||
Add your source code files like the following sample in the `Makefile.inc`
|
||||
|
||||
|
|
|
@ -114,6 +114,9 @@ PLATFORM_DEFS += \
|
|||
-DWITH_HFSNIFF
|
||||
|
||||
# Standalone mode
|
||||
ifneq ($(strip $(filter $(PLATFORM_DEFS),$(STANDALONE_REQ_DEFS))),$(strip $(STANDALONE_REQ_DEFS)))
|
||||
$(error Chosen Standalone mode $(STANDALONE) requires $(strip $(STANDALONE_REQ_DEFS)), unsupported by $(PLTNAME))
|
||||
endif
|
||||
PLATFORM_DEFS+=$(STANDALONE_PLATFORM_DEFS)
|
||||
|
||||
$(info $(findstring WITH_STANDALONE_*,$(PLATFORM_DEFS)))
|
||||
|
|
Loading…
Reference in a new issue