2 # lwk/arch/x86_64/boot/compressed/Makefile
4 # create a compressed vmlwk image from the original vmlwk
6 # Note all the files here are compiled/linked as 32bit executables.
9 targets := vmlwk vmlwk.bin vmlwk.bin.gz head.o misc.o piggy.o
10 EXTRA_AFLAGS := -traditional
12 # cannot use EXTRA_CFLAGS because base CFLAGS contains -mkernel which conflicts with
14 CFLAGS := -m64 -D__KERNEL__ -Iinclude -O2 -fno-strict-aliasing -fPIC -mcmodel=small -fno-builtin
15 LDFLAGS := -m elf_x86_64
18 $(obj)/vmlwk: $(src)/vmlwk.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
22 $(obj)/vmlwk.bin: vmlwk FORCE
23 $(call if_changed,objcopy)
25 $(obj)/vmlwk.bin.gz: $(obj)/vmlwk.bin FORCE
26 $(call if_changed,gzip)
28 LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
30 $(obj)/piggy.o: $(obj)/vmlwk.scr $(obj)/vmlwk.bin.gz FORCE