[tools] add mktitanimg to create Titan (AR7-based) images (#6632)
[openwrt/svn-archive/archive.git] / tools / firmware-utils / Makefile
1 #
2 # Copyright (C) 2006-2008 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
9 PKG_NAME := firmware-utils
10
11 include $(INCLUDE_DIR)/host-build.mk
12 include $(INCLUDE_DIR)/kernel.mk
13
14 define cc
15 $(CC) $(HOST_CFLAGS) -include endian.h -o $(HOST_BUILD_DIR)/bin/$(firstword $(1)) $(foreach src,$(1),src/$(src).c) $(2)
16 endef
17
18
19 define Host/Compile
20 mkdir -p $(HOST_BUILD_DIR)/bin
21 $(call cc,addpattern)
22 $(call cc,trx)
23 $(call cc,motorola-bin)
24 $(call cc,dgfirmware)
25 $(call cc,trx2usr)
26 $(call cc,ptgen)
27 $(call cc,airlink)
28 $(call cc,srec2bin)
29 $(call cc,mkmylofw)
30 $(call cc,mkcsysimg)
31 $(call cc,mkzynfw)
32 $(call cc,lzma2eva,-lz)
33 $(call cc,mkcasfw)
34 $(call cc,mkfwimage,-lz)
35 $(call cc,mkfwimage2,-lz)
36 $(call cc,imagetag)
37 $(call cc,add_header)
38 $(call cc,makeamitbin)
39 $(call cc,encode_crc)
40 $(call cc,nand_ecc)
41 $(call cc,mkplanexfw sha1)
42 $(call cc,mktplinkfw md5)
43 $(call cc,pc1crypt)
44 $(call cc,osbridge-crc)
45 $(call cc,wrt400n cyg_crc32)
46 $(call cc,wndr3700)
47 $(call cc,mkdniimg)
48 $(call cc,mktitanimg)
49 endef
50
51 define Host/Install
52 $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
53 endef
54
55 $(eval $(call HostBuild))