firmware-utils: add otrx tool for handling TRX images
[openwrt/openwrt.git] / tools / firmware-utils / Makefile
1 #
2 # Copyright (C) 2006-2012 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 $(HOSTCC) $(HOST_CFLAGS) -include endian.h $(HOST_LDFLAGS) -o $(HOST_BUILD_DIR)/bin/$(firstword $(1)) $(foreach src,$(1),src/$(src).c) $(2)
16 endef
17
18 define Host/Compile
19 mkdir -p $(HOST_BUILD_DIR)/bin
20 $(call cc,addpattern)
21 $(call cc,asustrx)
22 $(call cc,trx)
23 $(call cc,otrx)
24 $(call cc,motorola-bin)
25 $(call cc,dgfirmware)
26 $(call cc,mksenaofw md5)
27 $(call cc,trx2usr)
28 $(call cc,ptgen)
29 $(call cc,srec2bin)
30 $(call cc,mkmylofw)
31 $(call cc,mkcsysimg)
32 $(call cc,mkzynfw)
33 $(call cc,lzma2eva,-lz)
34 $(call cc,mkcasfw)
35 $(call cc,mkfwimage,-lz -Wall)
36 $(call cc,mkfwimage2,-lz)
37 $(call cc,imagetag imagetag_cmdline cyg_crc32)
38 $(call cc,add_header)
39 $(call cc,makeamitbin)
40 $(call cc,encode_crc)
41 $(call cc,nand_ecc)
42 $(call cc,mkplanexfw sha1)
43 $(call cc,mktplinkfw mktplinkfw-lib md5, -Wall -fgnu89-inline)
44 $(call cc,mktplinkfw2 mktplinkfw-lib md5, -fgnu89-inline)
45 $(call cc,tplink-safeloader md5, -Wall)
46 $(call cc,pc1crypt)
47 $(call cc,osbridge-crc)
48 $(call cc,wrt400n cyg_crc32)
49 $(call cc,mkdniimg)
50 $(call cc,mktitanimg)
51 $(call cc,mkchkimg)
52 $(call cc,mkzcfw cyg_crc32)
53 $(call cc,spw303v)
54 $(call cc,zyxbcm)
55 $(call cc,trx2edips)
56 $(call cc,xorimage)
57 $(call cc,buffalo-enc buffalo-lib, -Wall)
58 $(call cc,buffalo-tag buffalo-lib, -Wall)
59 $(call cc,buffalo-tftp buffalo-lib, -Wall)
60 $(call cc,mkwrgimg md5, -Wall)
61 $(call cc,mkwrggimg md5, -Wall)
62 $(call cc,mkedimaximg)
63 $(call cc,mkbrncmdline)
64 $(call cc,mkbrnimg)
65 $(call cc,mkdapimg)
66 $(call cc, mkcameofw, -Wall)
67 $(call cc,seama md5)
68 $(call cc,oseama md5, -Wall)
69 $(call cc,fix-u-media-header cyg_crc32,-Wall)
70 $(call cc,hcsmakeimage bcmalgo)
71 $(call cc,mkporayfw, -Wall)
72 $(call cc,mkhilinkfw, -lcrypto)
73 $(call cc,mkdcs932, -Wall)
74 $(call cc,mkheader_gemtek,-lz)
75 $(call cc,mkrtn56uimg, -lz)
76 $(call cc,dgn3500sum, -Wall)
77 $(call cc,edimax_fw_header, -Wall)
78 $(call cc,mkmerakifw sha1, -Wall)
79 $(call cc,mkmerakifw-old, -Wall)
80 $(call cc,jcgimage, -lz -Wall)
81 $(call cc,mkbuffaloimg, -Wall)
82 $(call cc,zyimage, -Wall)
83 $(call cc,mkdhpimg buffalo-lib, -Wall)
84 endef
85
86 define Host/Install
87 $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
88 endef
89
90 $(eval $(call HostBuild))