console-client: Enable use of a configuration file
However, only initialise a config if the option was provided. This
avoids searching for the default config, which may not exist and is
intended for the server.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I08f736243c1843bfb8855f5ceb69418d59a8775a
diff --git a/Makefile.am b/Makefile.am
index 059ac1b..ce84c4c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,10 +21,14 @@
obmc_console_server_LDFLAGS = $(SYSTEMD_LIBS) -lrt
obmc_console_server_CFLAGS = $(SYSTEMD_CFLAGS)
+obmc_console_client_CPPFLAGS = \
+ -DSYSCONFDIR=\"$(sysconfdir)\"
+
obmc_console_client_SOURCES = \
console-client.c \
console-server.h \
console-socket.c \
+ config.c \
util.c
SUBDIRS = test