[cns3xxx]: rename 2.6.39 patches directory
[openwrt.git] / target / linux / ar71xx / image / lzma-loader / Makefile
1 #
2 # Copyright (C) 2011 OpenWrt.org
3 # Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 LZMA_TEXT_START := 0x80a00000
12 LOADER := loader.bin
13 LOADER_NAME := $(basename $(notdir $(LOADER)))
14 LOADER_DATA :=
15 TARGET_DIR :=
16 FLASH_OFFS :=
17 FLASH_MAX :=
18
19 ifeq ($(TARGET_DIR),)
20 TARGET_DIR := $(KDIR)
21 endif
22
23 LOADER_BIN := $(TARGET_DIR)/$(LOADER_NAME).bin
24 LOADER_GZ := $(TARGET_DIR)/$(LOADER_NAME).gz
25 LOADER_ELF := $(TARGET_DIR)/$(LOADER_NAME).elf
26
27 PKG_NAME := lzma-loader
28 PKG_BUILD_DIR := $(KDIR)/$(PKG_NAME)
29
30 .PHONY : loader-compile loader.bin loader.elf loader.gz
31
32 $(PKG_BUILD_DIR)/.prepared:
33 mkdir $(PKG_BUILD_DIR)
34 $(CP) ./src/* $(PKG_BUILD_DIR)/
35 touch $@
36
37 loader-compile: $(PKG_BUILD_DIR)/.prepared
38 $(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE="$(TARGET_CROSS)" \
39 LZMA_TEXT_START=$(LZMA_TEXT_START) \
40 LOADER_DATA=$(LOADER_DATA) \
41 FLASH_OFFS=$(FLASH_OFFS) \
42 FLASH_MAX=$(FLASH_MAX) \
43 clean all
44
45 loader.gz: $(PKG_BUILD_DIR)/loader.bin
46 gzip -nc9 $< > $(LOADER_GZ)
47
48 loader.elf: $(PKG_BUILD_DIR)/loader.elf
49 $(CP) $< $(LOADER_ELF)
50
51 loader.bin: $(PKG_BUILD_DIR)/loader.bin
52 $(CP) $< $(LOADER_BIN)
53
54 download:
55 prepare: $(PKG_BUILD_DIR)/.prepared
56 compile: loader-compile
57
58 install:
59
60 clean:
61 rm -rf $(PKG_BUILD_DIR)
62
This page took 0.053488 seconds and 5 git commands to generate.