firmware-utils: imagetag: use cyg_crc32 instead of duplicating code
[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,trx)
22 $(call cc,motorola-bin)
23 $(call cc,dgfirmware)
24 $(call cc,mksenaofw md5)
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 imagetag_cmdline cyg_crc32)
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,mktplinkfw2 md5)
44 $(call cc,tplink-safeloader md5, -Wall)
45 $(call cc,pc1crypt)
46 $(call cc,osbridge-crc)
47 $(call cc,wrt400n cyg_crc32)
48 $(call cc,mkdniimg)
49 $(call cc,mktitanimg)
50 $(call cc,mkchkimg)
51 $(call cc,mkzcfw cyg_crc32)
52 $(call cc,spw303v)
53 $(call cc,zyxbcm)
54 $(call cc,trx2edips)
55 $(call cc,xorimage)
56 $(call cc,buffalo-enc buffalo-lib, -Wall)
57 $(call cc,buffalo-tag buffalo-lib, -Wall)
58 $(call cc,buffalo-tftp buffalo-lib, -Wall)
59 $(call cc,mkwrgimg md5, -Wall)
60 $(call cc,mkedimaximg)
61 $(call cc,mkbrncmdline)
62 $(call cc,mkbrnimg)
63 $(call cc,mkdapimg)
64 $(call cc, mkcameofw, -Wall)
65 $(call cc,seama md5)
66 $(call cc,fix-u-media-header cyg_crc32,-Wall)
67 $(call cc,hcsmakeimage bcmalgo)
68 $(call cc,mkporayfw, -Wall)
69 $(call cc,mkhilinkfw, -lcrypto)
70 $(call cc,mkdcs932, -Wall)
71 $(call cc,mkheader_gemtek,-lz)
72 $(call cc,mkrtn56uimg, -lz)
73 $(call cc,dgn3500sum)
74 $(call cc,edimax_fw_header, -Wall)
75 endef
76
77 define Host/Install
78 $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
79 endef
80
81 $(eval $(call HostBuild))