Makefile 1.5 KB

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