ramips: Add a tool to create JCG factory images
[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,motorola-bin)
24         $(call cc,dgfirmware)
25         $(call cc,mksenaofw md5)
26         $(call cc,trx2usr)
27         $(call cc,ptgen)
28         $(call cc,airlink)
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 md5)
44         $(call cc,mktplinkfw2 md5)
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,mkedimaximg)
62         $(call cc,mkbrncmdline)
63         $(call cc,mkbrnimg)
64         $(call cc,mkdapimg)
65         $(call cc, mkcameofw, -Wall)
66         $(call cc,seama md5)
67         $(call cc,oseama md5, -Wall)
68         $(call cc,fix-u-media-header cyg_crc32,-Wall)
69         $(call cc,hcsmakeimage bcmalgo)
70         $(call cc,mkporayfw, -Wall)
71         $(call cc,mkhilinkfw, -lcrypto)
72         $(call cc,mkdcs932, -Wall)
73         $(call cc,mkheader_gemtek,-lz)
74         $(call cc,mkrtn56uimg, -lz)
75         $(call cc,dgn3500sum)
76         $(call cc,edimax_fw_header, -Wall)
77         $(call cc,mkmerakifw sha1, -Wall)
78         $(call cc,jcgimage, -lz -Wall)
79 endef
80
81 define Host/Install
82         $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
83 endef
84
85 $(eval $(call HostBuild))