mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
HV: config: adapt to the generated config.h
This patch drops "#include <bsp_cfg.h>" and include the generated config.h in
CFLAGS for the configuration data.
Also make sure that all configuration data have the 'CONFIG_' prefix.
v4 -> v5:
* No changes.
v3 -> v4:
* Add '-include config.h' to hypervisor/bsp/uefi/efi/Makefile.
* Update comments mentioning bsp_cfg.h.
v2 -> v3:
* Include config.h on the command line instead of in any header or source to
avoid including config.h multiple times.
* Add config.h as an additional dependency for source compilation.
v1 -> v2:
* No changes.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
This commit is contained in:
@@ -36,7 +36,7 @@ HV_FILE:=acrn
|
||||
EFI_OBJDIR:=$(HV_OBJDIR)/bsp/uefi/efi
|
||||
C_SRCS = boot.c pe.c malloc.c
|
||||
ACRN_OBJS := $(patsubst %.c,$(EFI_OBJDIR)/%.o,$(C_SRCS))
|
||||
INCLUDE_PATH += ../include/bsp/
|
||||
INCLUDE_PATH += $(HV_OBJDIR)/include
|
||||
|
||||
OBJCOPY=objcopy
|
||||
|
||||
@@ -68,7 +68,8 @@ endif
|
||||
|
||||
CFLAGS=-I. -I.. -I$(INCDIR)/efi -I$(INCDIR)/efi/$(ARCH) \
|
||||
-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
|
||||
-Wall -I../fs/ -D$(ARCH) -O2
|
||||
-Wall -I../fs/ -D$(ARCH) -O2 \
|
||||
-include config.h
|
||||
|
||||
CFLAGS += -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387
|
||||
|
||||
@@ -107,11 +108,11 @@ install-conf: $(CONF_FILE)
|
||||
clean:
|
||||
rm -f $(BOOT) $(HV_OBJDIR)/$(HV_FILE).efi $(EFI_OBJDIR)/boot.so $(ACRN_OBJS) $(FS)
|
||||
|
||||
$(EFI_OBJDIR)/%.o:%.S
|
||||
$(EFI_OBJDIR)/%.o:%.S $(HV_OBJDIR)/$(HV_CONFIG_H)
|
||||
[ ! -e $@ ] && mkdir -p $(dir $@); \
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(EFI_OBJDIR)/%.o: %.c
|
||||
$(EFI_OBJDIR)/%.o: %.c $(HV_OBJDIR)/$(HV_CONFIG_H)
|
||||
[ ! -e $@ ] && mkdir -p $(dir $@); \
|
||||
$(CC) $(patsubst %, -I%, $(INCLUDE_PATH)) -I. -c $(CFLAGS) $(ARCH_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
Reference in New Issue
Block a user