Makefile 2.6 KB

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