zephyr/arch/x86/Makefile.gdt

27 lines
584 B
Makefile

ifeq ($(KBUILD_VERBOSE),1)
GENGDT_EXTRA_ARGS := --verbose
else
GENGDT_EXTRA_ARGS :=
endif
GENGDT := $(srctree)/scripts/gen_gdt.py
OUTPUT_FORMAT ?= elf32-i386
OUTPUT_ARCH ?= i386
quiet_cmd_gen_gdt = GDT $@
cmd_gen_gdt = \
( \
$(GENGDT) --kernel $(PREBUILT_KERNEL) \
--output-gdt gdt.bin \
$(GENGDT_EXTRA_ARGS) && \
$(OBJCOPY) -I binary -B $(OUTPUT_ARCH) -O $(OUTPUT_FORMAT) \
--rename-section .data=gdt_ram_data gdt.bin $@ \
)
gdt.o: $(PREBUILT_KERNEL) $(GENGDT)
$(call cmd,gen_gdt)
GENERATED_KERNEL_OBJECT_FILES += gdt.o