Makefile (8e029fcdd8702719c9179317cae9ef84ebe7027e) | Makefile (c4845474a01f699966272536e8416222e3f2d2cb) |
---|---|
1# 2# arch/x86/realmode/Makefile 3# 4# This file is subject to the terms and conditions of the GNU General Public 5# License. See the file "COPYING" in the main directory of this archive 6# for more details. 7# 8# 9 | 1# 2# arch/x86/realmode/Makefile 3# 4# This file is subject to the terms and conditions of the GNU General Public 5# License. See the file "COPYING" in the main directory of this archive 6# for more details. 7# 8# 9 |
10subdir- := wakeup 11 | |
12always := realmode.bin 13 14realmode-y += header.o 15realmode-y += trampoline_$(BITS).o 16realmode-y += stack.o 17realmode-$(CONFIG_X86_32) += reboot_32.o | 10always := realmode.bin 11 12realmode-y += header.o 13realmode-y += trampoline_$(BITS).o 14realmode-y += stack.o 15realmode-$(CONFIG_X86_32) += reboot_32.o |
18realmode-$(CONFIG_ACPI_SLEEP) += wakeup/wakeup.o | 16realmode-$(CONFIG_ACPI_SLEEP) += $(wakeup-objs) |
19 | 17 |
18wakeup-objs := wakeup_asm.o wakemain.o video-mode.o 19wakeup-objs += copy.o bioscall.o regs.o 20# The link order of the video-*.o modules can matter. In particular, 21# video-vga.o *must* be listed first, followed by video-vesa.o. 22# Hardware-specific drivers should follow in the order they should be 23# probed, and video-bios.o should typically be last. 24wakeup-objs += video-vga.o 25wakeup-objs += video-vesa.o 26wakeup-objs += video-bios.o 27 |
|
20targets += $(realmode-y) 21 | 28targets += $(realmode-y) 29 |
22$(obj)/wakeup/wakeup.o: FORCE 23 $(Q)$(MAKE) $(build)=$(obj)/wakeup $@ 24 | |
25REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y)) 26 27sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p' 28 29quiet_cmd_pasyms = PASYMS $@ 30 cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \ 31 sed $(sed-pasyms) | sort | uniq > $@ 32 --- 17 unchanged lines hidden (view full) --- 50 cmd_relocs = scripts/x86-relocs --realmode $< > $@ 51$(obj)/realmode.relocs: $(obj)/realmode.elf FORCE 52 $(call if_changed,relocs) 53 54# --------------------------------------------------------------------------- 55 56# How to compile the 16-bit code. Note we always compile for -march=i386, 57# that way we can complain to the user if the CPU is insufficient. | 30REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y)) 31 32sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p' 33 34quiet_cmd_pasyms = PASYMS $@ 35 cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \ 36 sed $(sed-pasyms) | sort | uniq > $@ 37 --- 17 unchanged lines hidden (view full) --- 55 cmd_relocs = scripts/x86-relocs --realmode $< > $@ 56$(obj)/realmode.relocs: $(obj)/realmode.elf FORCE 57 $(call if_changed,relocs) 58 59# --------------------------------------------------------------------------- 60 61# How to compile the 16-bit code. Note we always compile for -march=i386, 62# that way we can complain to the user if the CPU is insufficient. |
58KBUILD_CFLAGS := $(LINUXINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ \ | 63KBUILD_CFLAGS := $(LINUXINCLUDE) -m32 -g -Os -D_SETUP -D__KERNEL__ -D_WAKEUP \ 64 -I$(srctree)/arch/x86/boot \ |
59 -DDISABLE_BRANCH_PROFILING \ 60 -Wall -Wstrict-prototypes \ 61 -march=i386 -mregparm=3 \ 62 -include $(srctree)/$(src)/../../boot/code16gcc.h \ 63 -fno-strict-aliasing -fomit-frame-pointer \ 64 $(call cc-option, -ffreestanding) \ 65 $(call cc-option, -fno-toplevel-reorder,\ 66 $(call cc-option, -fno-unit-at-a-time)) \ 67 $(call cc-option, -fno-stack-protector) \ 68 $(call cc-option, -mpreferred-stack-boundary=2) 69KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 70GCOV_PROFILE := n | 65 -DDISABLE_BRANCH_PROFILING \ 66 -Wall -Wstrict-prototypes \ 67 -march=i386 -mregparm=3 \ 68 -include $(srctree)/$(src)/../../boot/code16gcc.h \ 69 -fno-strict-aliasing -fomit-frame-pointer \ 70 $(call cc-option, -ffreestanding) \ 71 $(call cc-option, -fno-toplevel-reorder,\ 72 $(call cc-option, -fno-unit-at-a-time)) \ 73 $(call cc-option, -fno-stack-protector) \ 74 $(call cc-option, -mpreferred-stack-boundary=2) 75KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 76GCOV_PROFILE := n |