From c616f47d6b6bf0a62034b8b814848dd9aebdd6f5 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 25 Apr 2019 22:40:46 +0200 Subject: [PATCH] Use placeholder for standalone mode if needed --- armsrc/Makefile | 2 +- armsrc/Standalone/placeholder.c | 9 +++++++++ armsrc/appmain.c | 8 -------- 3 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 armsrc/Standalone/placeholder.c diff --git a/armsrc/Makefile b/armsrc/Makefile index d03448293..29f5505e3 100644 --- a/armsrc/Makefile +++ b/armsrc/Makefile @@ -77,7 +77,7 @@ endif # Generic standalone Mode injection of source code -SRC_STANDALONE = +SRC_STANDALONE = placeholder.c # WITH_STANDALONE_LF_ICERUN ifneq (,$(findstring WITH_STANDALONE_LF_ICERUN,$(APP_CFLAGS))) SRC_STANDALONE = lf_icerun.c diff --git a/armsrc/Standalone/placeholder.c b/armsrc/Standalone/placeholder.c new file mode 100644 index 000000000..e179bc876 --- /dev/null +++ b/armsrc/Standalone/placeholder.c @@ -0,0 +1,9 @@ +#include "standalone.h" // standalone definitions +#include "apps.h" // debug statements + +void ModInfo(void) { + DbpString(" No standalone mode present"); +} + +void RunMod() { +} diff --git a/armsrc/appmain.c b/armsrc/appmain.c index b6bba90d6..8c42a6017 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -1549,16 +1549,8 @@ void __attribute__((noreturn)) AppMain(void) { /* * So this is the trigger to execute a standalone mod. Generic entrypoint by following the standalone/standalone.h headerfile * All standalone mod "main loop" should be the RunMod() function. - * Since the standalone is either LF or HF, the somewhat bisarr defines below exists. */ -#if defined (WITH_LF) && ( defined (WITH_STANDALONE_LF_SAMYRUN) || defined (WITH_STANDALONE_LF_HIDBRUTE) || defined (WITH_STANDALONE_LF_PROXBRUTE) ) RunMod(); -#endif - -#if defined (WITH_ISO14443a) && ( defined (WITH_STANDALONE_HF_YOUNG) || defined(WITH_STANDALONE_HF_COLIN) || defined(WITH_STANDALONE_HF_MATTYRUN) || defined(WITH_STANDALONE_HF_BOG) ) - RunMod(); -#endif - } } }