Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #
  2. # Copyright (C) 2012 Jo-Philipp Wich <[email protected]>
  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. include $(INCLUDE_DIR)/package.mk
  10. define Package/owipcalc
  11. SECTION:=utils
  12. CATEGORY:=Utilities
  13. TITLE:=Simple IPv4/IPv6 address calculator
  14. MAINTAINER:=Jo-Philipp Wich <[email protected]>
  15. endef
  16. define Package/owipcalc/description
  17. The owipcalc utility supports a number of calculations and tests to work
  18. with ip-address ranges, this is useful for scripts that e.g. need to
  19. partition ipv6-prefixes into small subnets or to calculate address ranges
  20. for dhcp pools.
  21. endef
  22. define Build/Prepare
  23. $(INSTALL_DIR) $(PKG_BUILD_DIR)
  24. $(CP) ./src/* $(PKG_BUILD_DIR)/
  25. endef
  26. define Build/Configure
  27. endef
  28. define Build/Compile
  29. $(TARGET_CC) $(TARGET_CFLAGS) \
  30. -o $(PKG_BUILD_DIR)/owipcalc $(PKG_BUILD_DIR)/owipcalc.c
  31. endef
  32. define Package/owipcalc/install
  33. $(INSTALL_DIR) $(1)/usr/bin
  34. $(INSTALL_BIN) $(PKG_BUILD_DIR)/owipcalc $(1)/usr/bin/owipcalc
  35. endef
  36. $(eval $(call BuildPackage,owipcalc))