Makefile 443 B

12345678910111213141516171819
  1. #
  2. # create a compressed vmlinux image from the original vmlinux
  3. #
  4. targets := vmlinux head.o misc.o piggy.o vmlinux.lds
  5. asflags-y :=
  6. OBJECTS = $(obj)/head.o $(obj)/misc.o
  7. LDFLAGS_vmlinux := -T
  8. $(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(obj)/piggy.o FORCE
  9. $(call if_changed,ld)
  10. LDFLAGS_piggy.o := -r --format binary --oformat elf32-littlenios2 -T
  11. $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/../vmlinux.gz FORCE
  12. $(call if_changed,ld)