cli: Add a new CLI wrapper
This new CLI wrapper introduces a command mode, like we are used from
Git for instance. The first argument specifies the command mode, which
is `prog` for the classic flashprog CLI. As an alternative to a first
argument, it can be called as `flashprog-cmd`, `flashcmd`, or `fcmd`,
via symbolic links for instance. Splitting CLI functions will allow us
to add more CLI features, that can be developed independently from the
classic CLI.
For instance, flashprog could then be called like this:
$ flashprog -p ch341a_spi
$ fprog -p ch341a_spi
For the future "config" CLI, more aliases are possible, e.g.:
$ flashprog config -p ch341a_spi
$ flashprog-config -p ch341a_spi
$ flashcfg -p ch341a_spi
$ fconfig -p ch341a_spi
Change-Id: I98cb110b47ebce52daf2e0972fc4565ef9d40242
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/72988
diff --git a/Makefile b/Makefile
index 79601fc..a75c280 100644
--- a/Makefile
+++ b/Makefile
@@ -401,7 +401,7 @@
###############################################################################
# Frontend related stuff.
-CLI_OBJS = cli_classic.o cli_output.o cli_common.o print.o
+CLI_OBJS = cli.o cli_classic.o cli_output.o cli_common.o print.o
# By default version information will be fetched from Git if available.
# Otherwise, versioninfo.inc stores the metadata required to build a