office-gobmx/external/argon2/ExternalProject_argon2.mk
Christian Lohmaier 875a1bf2e1 makefile simplification: replace $(call gb_UnpackedTarball_get_dir,foo)
…by a simple/static $(gb_UnpackedTarball_workdir)/foo
see also 0c4c84a14b

Change-Id: I8e6aa55c85534c4446556548910c950ddbe7c6fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167163
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2024-05-06 11:40:45 +02:00

54 lines
2 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalProject_ExternalProject,argon2))
$(eval $(call gb_ExternalProject_register_targets,argon2,\
build \
))
ifeq ($(COM),MSC)
# .vcxproj needs manual SolutionDir to find header; there is a .sln file but it
# expects "x86" where we pass "Win32"
$(call gb_ExternalProject_get_state_target,argon2,build):
$(call gb_Trace_StartRange,argon2,EXTERNAL)
$(call gb_ExternalProject_run,build,\
MSBuild.exe vs2015/Argon2OptDll/Argon2OptDll.vcxproj \
/p:SolutionDir="$(gb_UnpackedTarball_workdir)/argon2/" \
$(gb_MSBUILD_CONFIG_AND_PLATFORM) \
/p:PlatformToolset=$(VCTOOLSET) /p:VisualStudioVersion=$(VCVER) /ToolsVersion:Current \
$(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
&& MSBuild.exe vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj \
/p:SolutionDir="$(gb_UnpackedTarball_workdir)/argon2/" \
$(gb_MSBUILD_CONFIG_AND_PLATFORM) \
/p:PlatformToolset=$(VCTOOLSET) /p:VisualStudioVersion=$(VCVER) /ToolsVersion:Current \
$(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
$(if $(CROSS_COMPILING),,&& vs2015/build/Argon2OptTestCI.exe) \
)
$(call gb_Trace_EndRange,argon2,EXTERNAL)
else # $(COM)
# clear MAKEFILES because Makefile relies on built-in rules
$(call gb_ExternalProject_get_state_target,argon2,build):
$(call gb_Trace_StartRange,argon2,EXTERNAL)
$(call gb_ExternalProject_run,build,\
CFLAGS="$(CFLAGS) $(if $(filter-out WNT MACOSX,$(OS)),-fvisibility=hidden) -fPIC" \
MAKEFLAGS= $(MAKE) \
OPTTARGET=$(if $(filter X86_64,$(CPUNAME)),x86-64,forcefail) \
$(if $(CROSS_COMPILING),,&& $(MAKE) test) \
)
$(call gb_Trace_EndRange,argon2,EXTERNAL)
endif # $(COM)
# vim: set noet sw=4 ts=4: