Makefile 747 B

123456789101112131415161718192021222324252627282930313233
  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 := lzma-loader
  9. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  10. $(PKG_BUILD_DIR)/.prepared:
  11. mkdir $(PKG_BUILD_DIR)
  12. $(CP) ./src/* $(PKG_BUILD_DIR)/
  13. touch $@
  14. $(PKG_BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/.prepared
  15. $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" \
  16. LD="$(TARGET_CROSS)ld" CROSS_COMPILE="$(TARGET_CROSS)"
  17. download:
  18. prepare: $(PKG_BUILD_DIR)/.prepared
  19. compile: $(PKG_BUILD_DIR)/loader.gz
  20. install:
  21. ifneq ($(TARGET),)
  22. install: compile
  23. $(CP) $(PKG_BUILD_DIR)/loader.gz $(PKG_BUILD_DIR)/loader.elf $(TARGET)/
  24. endif
  25. clean:
  26. rm -rf $(PKG_BUILD_DIR)