Makefile: Refine Makefile to generate both industry and sdc images

We are trying to add both industry and sdc images to CL build. To
maintain the build interface unchanged (no change from CL side), we
extend the build command to generate the different target images.

To identity different images, we use rule:
   $(HV_FILE).$(BOARD).$(FIRMWARE).$(SCENARIO)
as target image file name.

Tracked-On: #3593
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Yin Fengwei
2019-08-14 11:27:21 +08:00
committed by wenlingz
parent f9945484a7
commit adf3a59302
3 changed files with 48 additions and 39 deletions

View File

@@ -87,11 +87,24 @@ 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
# this is to keep the compatible with original output files
ifeq ($(BOARD), apl-nuc)
ifeq ($(SCENARIO), sdc)
install -D $(EFIBIN) $(DESTDIR)/usr/lib/acrn/$(HV_FILE).efi
endif
endif
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
# this is to keep the compatible with original output files
ifeq ($(BOARD), apl-nuc)
ifeq ($(SCENARIO), sdc)
install -D $(HV_OBJDIR)/$(HV_FILE).out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).efi.out
install -D $(HV_OBJDIR)/$(HV_FILE).map $(DESTDIR)/usr/lib/acrn/$(HV_FILE).efi.map
endif
endif
$(EFIBIN): $(BOOT)