Makefile 921 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #
  2. # Copyright (C) 2011 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:=maccalc
  9. PKG_RELEASE:=1
  10. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  11. include $(INCLUDE_DIR)/package.mk
  12. define Package/maccalc
  13. SECTION:=utils
  14. CATEGORY:=Utilities
  15. TITLE:=MAC address calculation
  16. endef
  17. define Package/maccalc/description
  18. This package contains a MAC address manipulation utility.
  19. endef
  20. define Build/Prepare
  21. mkdir -p $(PKG_BUILD_DIR)
  22. $(CP) ./src/* $(PKG_BUILD_DIR)/
  23. endef
  24. define Build/Configure
  25. endef
  26. define Build/Compile
  27. $(MAKE) -C $(PKG_BUILD_DIR) \
  28. CC="$(TARGET_CC)" \
  29. CFLAGS="$(TARGET_CFLAGS) -Wall" \
  30. LDFLAGS="$(TARGET_LDFLAGS)"
  31. endef
  32. define Package/maccalc/install
  33. $(INSTALL_DIR) $(1)/usr/sbin
  34. $(INSTALL_BIN) $(PKG_BUILD_DIR)/maccalc $(1)/usr/sbin/
  35. endef
  36. $(eval $(call BuildPackage,maccalc))