Mini-OS applications being compiled using Mini-OS headers without
being integrated in the make environment of Mini-OS need a way to set
CONFIG_* defines according to their Mini-OS configuration.
Add a new make target "config" for that purpose creating a Makefile
snipplet $(CONFIG_FILE) (defaults to ./minios-config.mk) containing
the needed information.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
include/list.h
mini-os
mini-os.gz
+minios-config.mk
libc = $(stubdom)
-XEN_INTERFACE_VERSION := 0x00030205
+XEN_INTERFACE_VERSION ?= 0x00030205
export XEN_INTERFACE_VERSION
# Try to find out the architecture family TARGET_ARCH_FAM.
DEFINES-$(CONFIG_XENBUS) += -DCONFIG_XENBUS
DEFINES-$(CONFIG_BALLOON) += -DCONFIG_BALLOON
+DEFINES-y += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
+
# Override settings for this OS
PTHREAD_LIBS =
nosharedlibs=y
$(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
gzip -f -9 -c $@ >$@.gz
+.PHONY: config
+CONFIG_FILE ?= $(CURDIR)/minios-config.mk
+config:
+ echo "$(DEFINES-y)" >$(CONFIG_FILE)
+
.PHONY: clean arch_clean
arch_clean:
DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
-DEF_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
DEF_ASFLAGS += -D__ASSEMBLY__
DEF_LDFLAGS +=