Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #
  2. # Copyright (C) 2012 Jo-Philipp Wich <jow@openwrt.org>
  3. #
  4. # This is free software, licensed under the Apache 2 license.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=owipcalc
  8. PKG_RELEASE:=3
  9. PKG_LICENSE:=Apache-2.0
  10. include $(INCLUDE_DIR)/package.mk
  11. define Package/owipcalc
  12. SECTION:=utils
  13. CATEGORY:=Utilities
  14. TITLE:=Simple IPv4/IPv6 address calculator
  15. MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  16. endef
  17. define Package/owipcalc/description
  18. The owipcalc utility supports a number of calculations and tests to work
  19. with ip-address ranges, this is useful for scripts that e.g. need to
  20. partition ipv6-prefixes into small subnets or to calculate address ranges
  21. for dhcp pools.
  22. endef
  23. define Build/Prepare
  24. $(INSTALL_DIR) $(PKG_BUILD_DIR)
  25. $(CP) ./src/* $(PKG_BUILD_DIR)/
  26. endef
  27. define Build/Configure
  28. endef
  29. define Build/Compile
  30. $(TARGET_CC) $(TARGET_CFLAGS) \
  31. -o $(PKG_BUILD_DIR)/owipcalc $(PKG_BUILD_DIR)/owipcalc.c
  32. endef
  33. define Package/owipcalc/install
  34. $(INSTALL_DIR) $(1)/usr/bin
  35. $(INSTALL_BIN) $(PKG_BUILD_DIR)/owipcalc $(1)/usr/bin/owipcalc
  36. endef
  37. $(eval $(call BuildPackage,owipcalc))