Makefile 801 B

12345678910111213141516171819202122232425262728293031323334353637
  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. include $(INCLUDE_DIR)/host-build.mk
  9. PKG_NAME := firmware-utils
  10. PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/firmware-utils
  11. CFLAGS := -O2 -I $(STAGING_DIR)/include-host -include endian.h
  12. define cc
  13. $(CC) $(CFLAGS) -o $(PKG_BUILD_DIR)/bin/$(1) src/$(1).c
  14. endef
  15. define Build/Compile
  16. mkdir -p $(PKG_BUILD_DIR)/bin
  17. $(call cc,addpattern)
  18. $(call cc,trx)
  19. $(call cc,motorola-bin)
  20. $(call cc,dgfirmware)
  21. $(call cc,trx2usr)
  22. $(call cc,ptgen)
  23. $(call cc,airlink)
  24. $(call cc,srec2bin)
  25. $(call cc,mksyshdr)
  26. $(call cc,mkmylofw)
  27. endef
  28. define Build/Install
  29. $(CP) $(PKG_BUILD_DIR)/bin/* $(STAGING_DIR)/bin
  30. endef
  31. $(eval $(call HostBuild))