Rework conditional feature usage
Currently, the infrastructure that we have to enable a flexible
compilation environment has a few issues:
- the allocator configuration is performed at run-time, while the log
configuration is performed at compile-time
- for a standard compile (ie, standard userspace, using
autoconf+automake to build), we need a few pre-defined configuration
options.
This change adds a bit of runtime selection to the logging
infrastructure, to match the allocator setup. We also unify the
compile-time defines into config.h, using MCTP_-prefixed macro names,
allowing integration into other build systems.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
diff --git a/Makefile.inc b/Makefile.inc
index fd63032..1ee555d 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -1,5 +1,5 @@
LIBMCTP_DIR ?= libmctp/
-LIBMCTP_OBJS = core.o alloc.o
+LIBMCTP_OBJS = core.o alloc.o log.o
LIBMCTP_BINDINGS ?= serial astlpc
LIBMCTP_OBJS += $(LIBMCTP_BINDINGS:%=%.o)