Makefile 740 B

123456789101112131415161718192021222324252627282930313233343536
  1. #
  2. # Copyright (C) 2006 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. define cc
  11. $(CC) $(HOST_CFLAGS) -include endian.h -o $(PKG_BUILD_DIR)/bin/$(1) src/$(1).c
  12. endef
  13. define Build/Compile
  14. mkdir -p $(PKG_BUILD_DIR)/bin
  15. $(call cc,addpattern)
  16. $(call cc,trx)
  17. $(call cc,motorola-bin)
  18. $(call cc,dgfirmware)
  19. $(call cc,trx2usr)
  20. $(call cc,ptgen)
  21. $(call cc,airlink)
  22. $(call cc,srec2bin)
  23. $(call cc,mkmylofw)
  24. $(call cc,mkcsysimg)
  25. $(call cc,mkzynfw)
  26. endef
  27. define Build/Install
  28. $(CP) $(PKG_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
  29. endef
  30. $(eval $(call HostBuild))