firmware-utils: bcm4908kernel: tool adding BCM4908 kernel header
[openwrt/openwrt.git] / tools / firmware-utils / Makefile
1 #
2 # Copyright (C) 2006-2020 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 PKG_RELEASE := 7
11
12 include $(INCLUDE_DIR)/host-build.mk
13 include $(INCLUDE_DIR)/kernel.mk
14
15 define cc
16 $(HOSTCC) \
17 $(HOST_CFLAGS) \
18 -Wno-unused-parameter \
19 -include endian.h $(HOST_LDFLAGS) \
20 -o $(HOST_BUILD_DIR)/bin/$(firstword $(1)) \
21 $(foreach src,$(1),src/$(src).c) \
22 $(2)
23 endef
24
25 define Host/Compile
26 mkdir -p $(HOST_BUILD_DIR)/bin
27 $(call cc,add_header)
28 $(call cc,addpattern)
29 $(call cc,asustrx)
30 $(call cc,bcm4908kernel,-Wall)
31 $(call cc,buffalo-enc buffalo-lib,-Wall)
32 $(call cc,buffalo-tag buffalo-lib,-Wall)
33 $(call cc,buffalo-tftp buffalo-lib,-Wall)
34 $(call cc,dgfirmware)
35 $(call cc,dgn3500sum,-Wall)
36 $(call cc,dns313-header,-Wall)
37 $(call cc,edimax_fw_header,-Wall)
38 $(call cc,encode_crc)
39 $(call cc,fix-u-media-header cyg_crc32,-Wall)
40 $(call cc,hcsmakeimage bcmalgo)
41 $(call cc,imagetag imagetag_cmdline cyg_crc32)
42 $(call cc,jcgimage,-lz -Wall)
43 $(call cc,lxlfw)
44 $(call cc,lzma2eva,-lz)
45 $(call cc,makeamitbin)
46 $(call cc,mkbrncmdline)
47 $(call cc,mkbrnimg)
48 $(call cc,mkbuffaloimg,-Wall)
49 $(call cc,mkcameofw,-Wall)
50 $(call cc,mkcasfw)
51 $(call cc,mkchkimg)
52 $(call cc,mkcsysimg)
53 $(call cc,mkdapimg)
54 $(call cc,mkdapimg2)
55 $(call cc,mkdhpimg buffalo-lib,-Wall)
56 $(call cc,mkdlinkfw mkdlinkfw-lib,-lz -Wall --std=c99)
57 $(call cc,mkdniimg)
58 $(call cc,mkedimaximg)
59 $(call cc,mkfwimage,-lz -Wall -Werror -Wextra -D_FILE_OFFSET_BITS=64)
60 $(call cc,mkfwimage2,-lz)
61 $(call cc,mkheader_gemtek,-lz)
62 $(call cc,mkhilinkfw,-lcrypto)
63 $(call cc,mkmerakifw sha1,-Wall)
64 $(call cc,mkmerakifw-old,-Wall)
65 $(call cc,mkmylofw)
66 $(call cc,mkplanexfw sha1)
67 $(call cc,mkporayfw,-Wall)
68 $(call cc,mkrasimage,--std=gnu99)
69 $(call cc,mkrtn56uimg,-lz)
70 $(call cc,mksenaofw md5,-Wall --std=gnu99)
71 $(call cc,mksercommfw,-Wall)
72 $(call cc,mktitanimg)
73 $(call cc,mktplinkfw mktplinkfw-lib md5,-Wall -fgnu89-inline)
74 $(call cc,mktplinkfw2 mktplinkfw-lib md5,-fgnu89-inline)
75 $(call cc,mkwrggimg md5,-Wall)
76 $(call cc,mkwrgimg md5,-Wall)
77 $(call cc,mkzcfw cyg_crc32)
78 $(call cc,mkzynfw)
79 $(call cc,motorola-bin)
80 $(call cc,nand_ecc)
81 $(call cc,nec-enc,-Wall --std=gnu99)
82 $(call cc,osbridge-crc)
83 $(call cc,oseama md5,-Wall)
84 $(call cc,otrx)
85 $(call cc,pc1crypt)
86 $(call cc,ptgen cyg_crc32)
87 $(call cc,seama md5)
88 $(call cc,sign_dlink_ru md5,-Wall)
89 $(call cc,spw303v)
90 $(call cc,srec2bin)
91 $(call cc,tplink-safeloader md5,-Wall --std=gnu99)
92 $(call cc,trx)
93 $(call cc,trx2edips)
94 $(call cc,trx2usr)
95 $(call cc,uimage_padhdr,-Wall -lz)
96 $(call cc,wrt400n cyg_crc32)
97 $(call cc,xorimage)
98 $(call cc,zyimage,-Wall)
99 $(call cc,zyxbcm)
100 endef
101
102 define Host/Install
103 $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
104 endef
105
106 $(eval $(call HostBuild))