2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
10 PKG_NAME := lzma-loader
11 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
13 $(PKG_BUILD_DIR)/.prepared:
14 mkdir $(PKG_BUILD_DIR)
15 $(CP) ./src/* $(PKG_BUILD_DIR)/
18 $(PKG_BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/.prepared
19 $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" \
20 LD="$(TARGET_CROSS)ld" CROSS_COMPILE="$(TARGET_CROSS)"
23 prepare: $(PKG_BUILD_DIR)/.prepared
24 compile: $(PKG_BUILD_DIR)/loader.gz
29 $(CP) $(PKG_BUILD_DIR)/loader.gz $(PKG_BUILD_DIR)/loader.elf $(TARGET)/
33 rm -rf $(PKG_BUILD_DIR)