From 23b1a0ab70f190dbbb33dabb18ec039c7d85d6b3 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 11 Jan 2020 23:51:49 +0300 Subject: Add implementation --- curl/curl/buildfile | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 curl/curl/buildfile (limited to 'curl/curl/buildfile') diff --git a/curl/curl/buildfile b/curl/curl/buildfile new file mode 100644 index 0000000..f6c40c4 --- /dev/null +++ b/curl/curl/buildfile @@ -0,0 +1,59 @@ +# file : curl/buildfile +# copyright : Copyright (c) 2018-2019 Code Synthesis Ltd +# license : cURL License; see accompanying COPYING file + +import libs = libcurl%lib{curl} +import libs += libca-certificates-curl%lib{ca-certificates-curl} + +exe{curl}: h{**} c{** -src/tool_main -lib/**} $libs + +tclass = $c.target.class +tsys = $c.target.system + +# Build options. +# +c.poptions += -DHAVE_CONFIG_H + +# Note that the upstream package uses the -pthread compiler/linker option on +# Linux and FreeBSD. The option is unsupported by build2 so we pass +# -D_REENTRANT and -lpthread preprocessor/linker options instead. +# +switch $tclass, $tsys +{ + case 'linux' | 'bsd' + c.poptions += -D_REENTRANT + + case 'windows', 'win32-msvc' + c.poptions += -DWIN32 +} + +c.poptions =+ "-I$src_base" "-I$src_base/src" "-I$src_base/lib" + +switch $c.class, $tsys +{ + case 'gcc' + { + # Disable the Clang targeting MSVC warnings. + # + if ($c.id == 'clang' && $tsys == 'win32-msvc') + c.coptions += -Wno-deprecated-declarations + } + case 'msvc' + { + # Disable warnings that pop up with /W3. + # + c.coptions += /wd4996 + } +} + +switch $tclass, $tsys +{ + case 'linux' | 'bsd' + c.libs += -lpthread + + case 'windows', 'mingw32' + c.libs+= -lws2_32 + + case 'windows' + c.libs += ws2_32.lib +} -- cgit v1.1