Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #
  2. # Copyright (C) 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:=b43-tools
  9. PKG_VERSION:=019
  10. PKG_SOURCE_URL:=https://github.com/mbuesch/b43-tools.git
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)
  13. PKG_SOURCE_VERSION:=8dce53297966b31b6c70a7a03c2433978dd9f288
  14. PKG_MIRROR_HASH:=247eb0297f14fbcc828685cc353150f30fa03bf886e7a477aadc4161d9c0458d
  15. HOST_BUILD_DIR=$(BUILD_DIR_HOST)/$(PKG_NAME)
  16. include $(INCLUDE_DIR)/host-build.mk
  17. define Host/Compile
  18. +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/fwcutter \
  19. CFLAGS="$(HOST_CFLAGS) -include endian.h" \
  20. $(HOST_MAKE_FLAGS) \
  21. $(1) QUIET_SPARSE=:
  22. +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/assembler \
  23. CFLAGS="$(HOST_CFLAGS) -include endian.h" \
  24. $(HOST_MAKE_FLAGS) \
  25. LDFLAGS= \
  26. $(1) QUIET_SPARSE=:
  27. endef
  28. define Host/Install
  29. $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
  30. $(INSTALL_BIN) $(HOST_BUILD_DIR)/fwcutter/b43-fwcutter $(STAGING_DIR_HOST)/bin/
  31. $(INSTALL_BIN) $(HOST_BUILD_DIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
  32. $(INSTALL_BIN) $(HOST_BUILD_DIR)/assembler/b43-asm.bin $(STAGING_DIR_HOST)/bin/
  33. $(INSTALL_BIN) ./files/b43-fwsquash.py $(STAGING_DIR_HOST)/bin/
  34. endef
  35. define Host/Clean
  36. rm -f $(STAGING_DIR_HOST)/bin/b43-fwcutter
  37. rm -f $(STAGING_DIR_HOST)/bin/b43-asm
  38. rm -f $(STAGING_DIR_HOST)/bin/b43-asm.bin
  39. rm -f $(STAGING_DIR_HOST)/bin/b43-fwsquash.py
  40. endef
  41. $(eval $(call HostBuild))