cli_classic: Rewrite programmer argument parsing

Only break programmer name and arguments and use the libflashprog
API to do the actual programmer lookup. This assumes that program-
mer names don't contain a colon. Otherwise it should yield the
same results as the old code.

Change-Id: Ie70df81a0531470a6bb005d78346719b4da49134
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/72981
diff --git a/Makefile b/Makefile
index c3bf071..79601fc 100644
--- a/Makefile
+++ b/Makefile
@@ -601,12 +601,7 @@
 # Programmer drivers and programmer support infrastructure.
 # Depending on the CONFIG_* variables set and verified above we set compiler flags and parameters below.
 
-ifdef CONFIG_DEFAULT_PROGRAMMER_NAME
-FEATURE_FLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_NAME=&programmer_$(CONFIG_DEFAULT_PROGRAMMER_NAME)'
-else
-FEATURE_FLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL'
-endif
-
+FEATURE_FLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_NAME="$(CONFIG_DEFAULT_PROGRAMMER_NAME)"'
 FEATURE_FLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="$(CONFIG_DEFAULT_PROGRAMMER_ARGS)"'
 
 ################################################################################