From d8c7f84598e9a8fc2bc3d088f6e72049b9849389 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 19 May 2026 00:10:17 +0200 Subject: [PATCH] Add Makefile PLATFORM_FILE variable to specify another Makefile.platform file --- CHANGELOG.md | 1 + Makefile | 3 ++- armsrc/Makefile | 3 ++- client/Makefile | 3 ++- doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md | 5 ++++- tools/fpga_compress/Makefile | 3 ++- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70323adec..1cf4fadc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] +- Added Makefile `PLATFORM_FILE` variable to specify another Makefile.platform file (@doegox) - Added `hf calypso probecmdcompat` command (@kormax) - Added secure channel operations to `hf iclass sam` and fixed/improved I2C bus operations (@antiklesys) - Added `hf calypso list` command (@kormax) diff --git a/Makefile b/Makefile index 1543b1c72..a7f15666b 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,8 @@ # See LICENSE.txt for the text of the license. #----------------------------------------------------------------------------- --include Makefile.platform +PLATFORM_FILE ?= Makefile.platform +-include $(PLATFORM_FILE) -include .Makefile.options.cache include Makefile.defs include common_arm/Makefile.hal diff --git a/armsrc/Makefile b/armsrc/Makefile index faa1c0de4..8309cca26 100644 --- a/armsrc/Makefile +++ b/armsrc/Makefile @@ -19,7 +19,8 @@ # This Makefile might have been called directly, not via the root Makefile, so: ifeq ($(PLTNAME),) - -include ../Makefile.platform + PLATFORM_FILE ?= ../Makefile.platform + -include $(PLATFORM_FILE) -include ../.Makefile.options.cache include ../common_arm/Makefile.hal # detect if there were changes in the platform definitions, requiring a clean diff --git a/client/Makefile b/client/Makefile index 4f04367a3..819921507 100644 --- a/client/Makefile +++ b/client/Makefile @@ -15,7 +15,8 @@ #----------------------------------------------------------------------------- ifeq ($(PLTNAME),) - -include ../Makefile.platform + PLATFORM_FILE ?= ../Makefile.platform + -include $(PLATFORM_FILE) -include ../.Makefile.options.cache # Default platform if no platform specified PLATFORM?=PM3RDV4 diff --git a/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md b/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md index 8dc3d445d..96759a9cf 100644 --- a/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md +++ b/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md @@ -61,7 +61,10 @@ These features make it very different from all other Proxmark3 devices, there is **Recommendation**: if you don't have a RDV4, we strongly recommend your device to have at least a 512KB arm chip, since this repo is crossing 256KB limit. There is still a way to skip parts to make it fit on a 256KB device, see below. If you need to tune things and save the configuration, create a file `Makefile.platform` in the root directory of the repository, see `Makefile.platform.sample`. -For an up-to-date exhaustive list of options, you can run `make PLATFORM=`. + +If you need to maintain several `Makefile.platform` files for different Proxmark3 devices, you can specify which file to use with e.g. `make PLATFORM_FILE=mydevice_platform`. + +For an up-to-date exhaustive list of options to use in a `Makefile.platform` file, you can run `make PLATFORM=`. ## PLATFORM ^[Top](#top) diff --git a/tools/fpga_compress/Makefile b/tools/fpga_compress/Makefile index 3e34619e8..28ee76a7a 100644 --- a/tools/fpga_compress/Makefile +++ b/tools/fpga_compress/Makefile @@ -1,5 +1,6 @@ ifeq ($(PLTNAME),) - -include ../../Makefile.platform + PLATFORM_FILE ?= ../../Makefile.platform + -include $(PLATFORM_FILE) -include ../../.Makefile.options.cache # Default platform if no platform specified PLATFORM?=PM3RDV4