aboutsummaryrefslogtreecommitdiff
path: root/package/jpeg-turbo/jpeg-turbo.mk
blob: 3e09c19e2a3fb2f921e368113be6def9b75a9f6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
################################################################################
#
# jpeg-turbo
#
################################################################################

JPEG_TURBO_VERSION = 1.3.1
JPEG_TURBO_SOURCE = libjpeg-turbo-$(JPEG_TURBO_VERSION).tar.gz
JPEG_TURBO_SITE = http://downloads.sourceforge.net/project/libjpeg-turbo/$(JPEG_TURBO_VERSION)
JPEG_TURBO_LICENSE = jpeg-license (BSD-3c-like)
JPEG_TURBO_LICENSE_FILES = README README-turbo.txt
JPEG_TURBO_INSTALL_STAGING = YES
JPEG_TURBO_CONF_OPT = --with-jpeg8
# libtool 1.5 patch failure
JPEG_TURBO_AUTORECONF = YES

ifeq ($(BR2_X86_CPU_HAS_MMX)$(BR2_ARM_CPU_HAS_NEON),y)
JPEG_TURBO_CONF_OPT += --with-simd
# x86 simd support needs nasm
JPEG_TURBO_DEPENDENCIES += $(if $(BR2_X86_CPU_HAS_MMX),host-nasm)
else
JPEG_TURBO_CONF_OPT += --without-simd
endif

define JPEG_TURBO_REMOVE_USELESS_TOOLS
	rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtran rdjpgcom tjbench wrjpgcom)
endef

JPEG_TURBO_POST_INSTALL_TARGET_HOOKS += JPEG_TURBO_REMOVE_USELESS_TOOLS

$(eval $(autotools-package))