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_StaticLibrary_StaticLibrary
,libpng
))
12 $(eval
$(call gb_StaticLibrary_set_warnings_disabled
,libpng
))
14 $(eval
$(call gb_StaticLibrary_use_unpacked
,libpng
,libpng
))
16 $(eval
$(call gb_StaticLibrary_use_externals
,libpng
,\
20 $(eval
$(call gb_StaticLibrary_add_generated_cobjects
,libpng
,\
21 UnpackedTarball
/libpng
/png \
22 UnpackedTarball
/libpng
/pngerror \
23 UnpackedTarball
/libpng
/pngget \
24 UnpackedTarball
/libpng
/pngmem \
25 UnpackedTarball
/libpng
/pngpread \
26 UnpackedTarball
/libpng
/pngread \
27 UnpackedTarball
/libpng
/pngrio \
28 UnpackedTarball
/libpng
/pngrtran \
29 UnpackedTarball
/libpng
/pngrutil \
30 UnpackedTarball
/libpng
/pngset \
31 UnpackedTarball
/libpng
/pngtrans \
32 UnpackedTarball
/libpng
/pngwio \
33 UnpackedTarball
/libpng
/pngwrite \
34 UnpackedTarball
/libpng
/pngwtran \
35 UnpackedTarball
/libpng
/pngwutil \
36 $(if
$(filter ARM AARCH64 ARM64
,$(CPUNAME
)),\
37 UnpackedTarball
/libpng
/arm
/arm_init \
38 UnpackedTarball
/libpng
/arm
/filter_neon_intrinsics \
39 UnpackedTarball
/libpng
/arm
/palette_neon_intrinsics \
41 $(if
$(filter POWERPC POWERPC64
,$(CPUNAME
)), \
42 UnpackedTarball
/libpng
/powerpc
/powerpc_init \
43 UnpackedTarball
/libpng
/powerpc
/filter_vsx_intrinsics \
47 # At least on Linux, with --enable-lto, when building both this external/libpng and external/skia,
48 # and building with GCC but building skia with Clang (which should be the sole combination that
49 # matches "LO_CLANG_CC is non-empty"), build this as a fat archive (including both the intermediate GCC
50 # object code for LTO and machine object code). Besides targets like Library_vcl (which benefit
51 # from the intermediate GCC object code for LTO), also Library_skia (built with the Clang toolchain
52 # lld, which does not understand intermediate GCC object code) includes this, so would otherwise
53 # fail to link (but now does not benefit from LTO for this included StaticLibrary_libpng):
54 ifeq ($(OS
)-$(ENABLE_LTO
),LINUX-TRUE
)
55 ifneq ($(filter SKIA
,$(BUILD_TYPE
)),)
56 ifneq ($(LO_CLANG_CC
),)
57 $(eval
$(call gb_StaticLibrary_add_cflags
,libpng
,-ffat-lto-objects
))
62 # vim: set noet sw=4 ts=4: