Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #
  2. # Copyright (C) 2006 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. PKG_NAME := loader
  9. PKG_VERSION := 0.05
  10. PKG_BUILD_DIR := $(KDIR)/$(PKG_NAME)-$(PKG_VERSION)$(LOADER_TYPE)
  11. $(PKG_BUILD_DIR)/.prepared:
  12. mkdir $(PKG_BUILD_DIR)
  13. $(CP) ./src/* $(PKG_BUILD_DIR)/
  14. touch $@
  15. $(PKG_BUILD_DIR)/lzma.elf: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/vmlinux.lzma
  16. PATH="$(TARGET_PATH)" $(MAKE) -C $(PKG_BUILD_DIR) \
  17. CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" \
  18. RAMSIZE=$(RAMSIZE) \
  19. LOADADDR=$(LOADADDR) \
  20. KERNEL_ENTRY=$(KERNEL_ENTRY) \
  21. IMAGE_COPY=$(IMAGE_COPY)
  22. $(PKG_BUILD_DIR)/vmlinux.lzma: $(KDIR)/vmlinux.lzma
  23. $(CP) $< $@
  24. $(KDIR)/loader$(LOADER_TYPE).elf: $(PKG_BUILD_DIR)/lzma.elf
  25. $(CP) $< $@
  26. $(KDIR)/loader$(LOADER_TYPE).bin: $(PKG_BUILD_DIR)/lzma.bin
  27. $(CP) $< $@
  28. download:
  29. prepare: $(PKG_BUILD_DIR)/.prepared
  30. compile: $(KDIR)/loader$(LOADER_TYPE).elf $(KDIR)/loader$(LOADER_TYPE).bin
  31. install:
  32. clean:
  33. rm -rf $(PKG_BUILD_DIR)
  34. rm -f $(KDIR)/loader.elf
  35. rm -f $(KDIR)/loader.bin