Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright (C) 2020 Paul Spooren <[email protected]>
  2. #
  3. # SPDX-License-Identifier: GPL-2.0-or-later
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=px5g-wolfssl
  6. PKG_RELEASE:=$(COMMITCOUNT)
  7. PKG_LICENSE:=GPL-2.0-or-later
  8. PKG_USE_MIPS16:=0
  9. PKG_MAINTAINER:=Paul Spooren <[email protected]>
  10. include $(INCLUDE_DIR)/package.mk
  11. define Package/px5g-wolfssl
  12. SECTION:=utils
  13. CATEGORY:=Utilities
  14. SUBMENU:=Encryption
  15. TITLE:=X.509 certificate generator (using WolfSSL)
  16. DEPENDS:=+libwolfssl
  17. PROVIDES:=px5g
  18. VARIANT:=wolfssl
  19. endef
  20. define Package/px5g-wolfssl/description
  21. Px5g is a tiny X.509 certificate generator.
  22. It suitable to create key files and certificates in DER
  23. and PEM format for use with stunnel, uhttpd and others.
  24. endef
  25. TARGET_LDFLAGS += -lwolfssl
  26. TARGET_CFLAGS += -Wl,--gc-sections
  27. define Build/Compile
  28. $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) \
  29. -o $(PKG_BUILD_DIR)/px5g px5g-wolfssl.c $(TARGET_LDFLAGS)
  30. endef
  31. define Package/px5g-wolfssl/install
  32. $(INSTALL_DIR) $(1)/usr/sbin
  33. $(INSTALL_BIN) $(PKG_BUILD_DIR)/px5g $(1)/usr/sbin/px5g
  34. endef
  35. $(eval $(call BuildPackage,px5g-wolfssl))