diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2012-02-09 18:33:31 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2012-02-09 18:33:31 +0000 |
commit | 684315da98921a483d7c7bd2effc16a95aee6b93 (patch) | |
tree | 2f8f84d55fb3c91cdf4f7ce688b88a4809ce38a1 /extras/mini-os/Makefile | |
parent | ca8a593cc7ff51d6360d16fce31f934c3026ded2 (diff) | |
download | xen-684315da98921a483d7c7bd2effc16a95aee6b93.tar.gz xen-684315da98921a483d7c7bd2effc16a95aee6b93.tar.bz2 xen-684315da98921a483d7c7bd2effc16a95aee6b93.zip |
mini-os: create app-specific configuration
Instead of using CONFIG_QEMU and CONFIG_GRUB to enable or disable minios
code, create CONFIG_ items for features and use application-specific
configuration files to enable or disable the features.
The configuration flags are currently added to the compiler command
line; as the number of flags grows this may need to move to a header.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/Makefile')
-rw-r--r-- | extras/mini-os/Makefile | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile index c4d26f0213..48d0d21b86 100644 --- a/extras/mini-os/Makefile +++ b/extras/mini-os/Makefile @@ -8,10 +8,25 @@ export XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/Config.mk OBJ_DIR ?= $(CURDIR) -ifneq ($(stubdom),y) +ifeq ($(MINIOS_CONFIG),) include Config.mk +else +EXTRA_DEPS += $(MINIOS_CONFIG) +include $(MINIOS_CONFIG) endif +# Configuration defaults +CONFIG_START_NETWORK ?= y +CONFIG_SPARSE_BSS ?= y +CONFIG_QEMU_XS_ARGS ?= n + +# Export config items as compiler directives +flags-$(CONFIG_START_NETWORK) += -DCONFIG_START_NETWORK +flags-$(CONFIG_SPARSE_BSS) += -DCONFIG_SPARSE_BSS +flags-$(CONFIG_QEMU_XS_ARGS) += -DCONFIG_QEMU_XS_ARGS + +DEF_CFLAGS += $(flags-y) + # Include common mini-os makerules. include minios.mk @@ -34,13 +49,38 @@ TARGET := mini-os # Subdirectories common to mini-os SUBDIRS := lib xenbus console +src-y += blkfront.c +src-y += daytime.c +src-y += events.c +src-y += fbfront.c +src-y += gntmap.c +src-y += gnttab.c +src-y += hypervisor.c +src-y += kernel.c +src-y += lock.c +src-y += main.c +src-y += mm.c +src-y += netfront.c +src-y += pcifront.c +src-y += sched.c + +src-y += lib/ctype.c +src-y += lib/math.c +src-y += lib/printf.c +src-y += lib/stack_chk_fail.c +src-y += lib/string.c +src-y += lib/sys.c +src-y += lib/xmalloc.c +src-y += lib/xs.c + +src-y += xenbus/xenbus.c + +src-y += console/console.c +src-y += console/xencons_ring.c + # The common mini-os objects to build. APP_OBJS := -OBJS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(wildcard *.c)) -OBJS += $(patsubst %.c,$(OBJ_DIR)/%.o,$(wildcard lib/*.c)) -OBJS += $(patsubst %.c,$(OBJ_DIR)/%.o,$(wildcard xenbus/*.c)) -OBJS += $(patsubst %.c,$(OBJ_DIR)/%.o,$(wildcard console/*.c)) - +OBJS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(src-y)) .PHONY: default default: $(OBJ_DIR)/$(TARGET) |