Makefile 607 B

1234567891011121314151617181920212223242526
  1. #
  2. # Copyright (C) 2010 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/image.mk
  9. define Build/Clean
  10. $(MAKE) -C lzma-loader clean
  11. endef
  12. define Image/Prepare
  13. cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
  14. $(MAKE) -C lzma-loader \
  15. KDIR="$(KDIR)" \
  16. clean compile
  17. endef
  18. define Image/Build
  19. ./my-mkimage $(KDIR)/loader.bin $(KDIR)/root.squashfs \
  20. $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
  21. endef
  22. $(eval $(call BuildImage))