[Buildroot] [PATCH] package: add polarssl library support

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Oct 12 21:16:39 UTC 2011


Le Wed, 12 Oct 2011 18:13:00 +0200,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com> a écrit :

> diff --git a/package/polarssl/polarssl.mk b/package/polarssl/polarssl.mk
> new file mode 100644
> index 0000000..915c5c3
> --- /dev/null
> +++ b/package/polarssl/polarssl.mk
> @@ -0,0 +1,29 @@
> +#############################################################
> +#
> +# polarssl
> +#
> +#############################################################
> +POLARSSL_VERSION:=1.0.0

POLARSSL_VERSION = 1.0.0

> +POLARSSL_SOURCE = polarssl-$(POLARSSL_VERSION)-gpl.tgz
> +POLARSSL_SITE = http://polarssl.org/code/releases/
> +POLARSSL_INSTALL_STAGING = YES
> +
> +define POLARSSL_CONFIGURE_CMDS
> +	true
> +endef

Remove this POLARSSL_CONFIGURE_CMDS...

> +define POLARSSL_BUILD_CMDS
> +	AR="$(TARGET_AR)" CC="$(TARGET_CC)" $(MAKE) -C $(@D)/library all
> +endef

You probably want to pass the cflags as well ?

> +define POLARSSL_INSTALL_STAGING_CMDS
> +	install -d $(STAGING_DIR)/usr/include/polarssl
> +	install -D -m 755 $(@D)/include/polarssl/*.h $(STAGING_DIR)/usr/include/polarssl/
> +	install -D -m 644 $(@D)/library/libpolarssl.* $(STAGING_DIR)/usr/lib
> +endef
> +
> +define POLARSSL_INSTALL_TARGET_CMDS
> +	install -D -m 644 $(@D)/library/libpolarssl.* $(TARGET_DIR)/usr/lib
> +endef
> +
> +$(eval $(call AUTOTARGETS,package,polarssl))

and use GENTARGETS instead, since this package is not autotools-based.
Moreover, the "package,polarssl" arguments are no longer needed.
Therefore:

$(eval $(call GENTARGETS))

With GENTARGETS, the default <pkg>_CONFIGURE_CMDS is empty, which is
why you won't have to define it to the true command.

Just curious, how does this compare to OpenSSL or GnuTLS, are are there
any well-known users of this library?

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com


More information about the buildroot mailing list