1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval
$(call gb_ExternalProject_ExternalProject
,libwebp
))
12 $(eval
$(call gb_ExternalProject_register_targets
,libwebp
,\
17 $(eval
$(call gb_ExternalProject_use_nmake
,libwebp
,build
))
19 # Explicitly passing in ARCH (for the known architectures, at least) avoids
20 # workdir/UnpackedTarball/libwebp/Makefile.vc not being able to detect it when CC is clang-cl:
21 $(call gb_ExternalProject_get_state_target
,libwebp
,build
):
22 $(call gb_Trace_StartRange
,libwebp
,EXTERNAL
)
23 $(call gb_ExternalProject_run
,build
,\
24 nmake
-nologo
-f Makefile.vc CFG
=$(if
$(MSVC_USE_DEBUG_RUNTIME
),debug
,release
)-static RTLIBCFG
=dynamic OBJDIR
=output \
25 $(if
$(filter INTEL
,$(CPUNAME
)),ARCH
=x86
, \
26 $(if
$(filter X86_64
,$(CPUNAME
)),ARCH
=x64
, \
27 $(if
$(filter AARCH64
,$(CPUNAME
)),ARCH
=ARM
))) \
29 $(call gb_Trace_EndRange
,libwebp
,EXTERNAL
)
31 $(eval
$(call gb_ExternalProject_use_autoconf
,libwebp
,build
))
33 $(call gb_ExternalProject_get_state_target
,libwebp
,build
) :
34 $(call gb_Trace_StartRange
,libwebp
,EXTERNAL
)
35 $(call gb_ExternalProject_run
,build
,\
36 export PKG_CONFIG
="" \
37 && MAKE
=$(MAKE
) $(gb_RUN_CONFIGURE
) .
/configure \
48 $(if
$(verbose
),--disable-silent-rules
,--enable-silent-rules
) \
49 CFLAGS
="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,libwebp)" \
50 CPPFLAGS
="$(CPPFLAGS) $(BOOST_CPPFLAGS)" \
51 LDFLAGS
="$(call gb_ExternalProject_get_link_flags,libwebp)" \
52 $(gb_CONFIGURE_PLATFORMS
) \
55 $(call gb_Trace_EndRange
,libwebp
,EXTERNAL
)
58 # vim: set noet sw=4 ts=4: