Makefile: remove 'clean' when building HV/DM
1. not need 'clean' when building ACRN-HV/DM each time 2. correct efi-stub wrong dependency Tracked-On: #2412 Signed-off-by: Minggui Cao <minggui.cao@intel.com> Reviewed-by: Binbin Wu <binbin.wu@intel.com>
This commit is contained in:
parent
42d5533e6f
commit
a335679ce9
2
Makefile
2
Makefile
|
@ -160,7 +160,6 @@ hypervisor:
|
|||
@if [ "$(BOARD_FILE)" != "" ] && [ -f $(BOARD_FILE) ] && [ "$(SCENARIO_FILE)" != "" ] && [ -f $(SCENARIO_FILE) ] && [ "$(TARGET_DIR)" = "" ]; then \
|
||||
echo "No TARGET_DIR parameter is specified, the original configuration source is overwritten!";\
|
||||
fi
|
||||
$(MAKE) -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) clean;
|
||||
$(MAKE) -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(abspath $(TARGET_DIR)) defconfig;
|
||||
$(MAKE) -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(abspath $(TARGET_DIR)) oldconfig;
|
||||
$(MAKE) -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) BOARD_FILE=$(BOARD_FILE) SCENARIO_FILE=$(SCENARIO_FILE) TARGET_DIR=$(abspath $(TARGET_DIR))
|
||||
|
@ -198,7 +197,6 @@ hypervisor:
|
|||
@cat $(HV_CFG_LOG)
|
||||
|
||||
devicemodel: tools
|
||||
$(MAKE) -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) RELEASE=$(RELEASE) clean
|
||||
$(MAKE) -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) DM_BUILD_VERSION=$(BUILD_VERSION) DM_BUILD_TAG=$(BUILD_TAG) DM_ASL_COMPILER=$(ASL_COMPILER) RELEASE=$(RELEASE)
|
||||
|
||||
tools:
|
||||
|
|
|
@ -221,9 +221,11 @@ $(VERSION_H):
|
|||
echo "#define DM_BUILD_TIME "\""$$TIME"\""" >> $(VERSION_H);\
|
||||
echo "#define DM_BUILD_USER "\""$$USER"\""" >> $(VERSION_H)
|
||||
|
||||
-include $(OBJS:.o=.d)
|
||||
|
||||
$(DM_OBJDIR)/%.o: %.c $(HEADERS)
|
||||
[ ! -e $@ ] && mkdir -p $(dir $@); \
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
$(CC) $(CFLAGS) -c $< -o $@ -MMD -MT $@
|
||||
|
||||
install: $(DM_OBJDIR)/$(PROGRAM) install-samples-nuc install-samples-mrb install-bios install-samples-up2
|
||||
install -D --mode=0755 $(DM_OBJDIR)/$(PROGRAM) $(DESTDIR)/usr/bin/$(PROGRAM)
|
||||
|
|
|
@ -88,11 +88,11 @@ LDFLAGS=-T $(LDSCRIPT) -Bsymbolic -shared -nostdlib -znocombreloc \
|
|||
-L$(LIBDIR) $(CRT0)
|
||||
EFIBIN=$(HV_OBJDIR)/$(HV_FILE).efi
|
||||
BOOT=$(EFI_OBJDIR)/boot.efi
|
||||
HV_BIN=$(HV_OBJDIR)/$(HV_FILE).bin
|
||||
|
||||
CONF_FILE=$(CURDIR)/clearlinux/acrn.conf
|
||||
|
||||
all: $(EFIBIN)
|
||||
$(OBJCOPY) --add-section .hv="$(HV_OBJDIR)/$(HV_FILE).bin" --change-section-vma .hv=0x6e000 --set-section-flags .hv=alloc,data,contents,load --section-alignment 0x1000 $(EFI_OBJDIR)/boot.efi $(EFIBIN)
|
||||
|
||||
install: $(EFIBIN) install-conf
|
||||
install -D $(EFIBIN) $(DESTDIR)/usr/lib/acrn/$(HV_FILE).$(BOARD).$(SCENARIO).efi
|
||||
|
@ -101,26 +101,29 @@ install-debug: $(HV_OBJDIR)/$(HV_FILE).map $(HV_OBJDIR)/$(HV_FILE).out
|
|||
install -D $(HV_OBJDIR)/$(HV_FILE).out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).$(BOARD).$(SCENARIO).efi.out
|
||||
install -D $(HV_OBJDIR)/$(HV_FILE).map $(DESTDIR)/usr/lib/acrn/$(HV_FILE).$(BOARD).$(SCENARIO).efi.map
|
||||
|
||||
$(EFIBIN): $(BOOT)
|
||||
$(EFIBIN): $(BOOT) $(HV_BIN)
|
||||
$(OBJCOPY) --add-section .hv="$(HV_BIN)" --change-section-vma .hv=0x6e000 --set-section-flags .hv=alloc,data,contents,load --section-alignment 0x1000 $(BOOT) $(EFIBIN)
|
||||
|
||||
$(EFI_OBJDIR)/boot.efi: $(EFI_OBJDIR)/boot.so
|
||||
$(BOOT): $(EFI_OBJDIR)/boot.so
|
||||
|
||||
$(EFI_OBJDIR)/boot.so: $(ACRN_OBJS) $(FS)
|
||||
$(EFI_OBJDIR)/boot.so: $(ACRN_OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $^ -lgnuefi -lefi $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
|
||||
|
||||
install-conf: $(CONF_FILE)
|
||||
install -D --mode=0644 $^ $(DESTDIR)/usr/share/acrn/samples/nuc/acrn.conf
|
||||
|
||||
clean:
|
||||
rm -f $(BOOT) $(HV_OBJDIR)/$(HV_FILE).efi $(EFI_OBJDIR)/boot.so $(ACRN_OBJS) $(FS)
|
||||
rm -f $(BOOT) $(HV_OBJDIR)/$(HV_FILE).efi $(EFI_OBJDIR)/boot.so $(ACRN_OBJS)
|
||||
|
||||
$(EFI_OBJDIR)/%.o:%.S $(HV_OBJDIR)/$(HV_CONFIG_H)
|
||||
[ ! -e $@ ] && mkdir -p $(dir $@); \
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
-include $(ACRN_OBJS:.o=.d)
|
||||
|
||||
$(EFI_OBJDIR)/%.o: %.c $(HV_OBJDIR)/$(HV_CONFIG_H)
|
||||
$(EFI_OBJDIR)/%.o:%.S
|
||||
[ ! -e $@ ] && mkdir -p $(dir $@); \
|
||||
$(CC) $(patsubst %, -I%, $(INCLUDE_PATH)) -I. -c $(CFLAGS) $(ARCH_CFLAGS) $< -o $@
|
||||
$(CC) $(CFLAGS) -c -o $@ $< -MMD -MT $@
|
||||
|
||||
$(EFI_OBJDIR)/%.o: %.c
|
||||
[ ! -e $@ ] && mkdir -p $(dir $@); \
|
||||
$(CC) $(patsubst %, -I%, $(INCLUDE_PATH)) -I. -c $(CFLAGS) $(ARCH_CFLAGS) $< -o $@ -MMD -MT $@
|
||||
|
||||
%.efi: %.so
|
||||
$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
|
||||
|
|
Loading…
Reference in New Issue