xref: /OK3568_Linux_fs/buildroot/package/assimp/assimp.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# assimp
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunASSIMP_VERSION = 5.0.1
8*4882a593SmuzhiyunASSIMP_SITE = $(call github,assimp,assimp,v$(ASSIMP_VERSION))
9*4882a593SmuzhiyunASSIMP_LICENSE = BSD-3-Clause
10*4882a593SmuzhiyunASSIMP_LICENSE_FILES = LICENSE
11*4882a593SmuzhiyunASSIMP_DEPENDENCIES = zlib
12*4882a593SmuzhiyunASSIMP_INSTALL_STAGING = YES
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun# relocation truncated to fit: R_68K_GOT16O. We also need to disable
15*4882a593Smuzhiyun# optimizations to not run into "Error: value -43420 out of range"
16*4882a593Smuzhiyun# assembler issues.
17*4882a593Smuzhiyunifeq ($(BR2_m68k),y)
18*4882a593SmuzhiyunASSIMP_CXXFLAGS += -mxgot -O0
19*4882a593Smuzhiyunendif
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun# just like m68k coldfire, mips64 also has some limitations on the GOT
22*4882a593Smuzhiyun# size for large libraries, which can be overcome by passing
23*4882a593Smuzhiyun# -mxgot. Solves "relocation truncated to fit: R_MIPS_CALL16" issues.
24*4882a593Smuzhiyunifeq ($(BR2_mips64)$(BR2_mips64el),y)
25*4882a593SmuzhiyunASSIMP_CXXFLAGS += -mxgot
26*4882a593Smuzhiyunendif
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun# workaround SuperH compiler failure when static linking (i.e -fPIC is
29*4882a593Smuzhiyun# not passed) in gcc versions 5.x or older. The -Os optimization level
30*4882a593Smuzhiyun# causes a "unable to find a register to spill in class
31*4882a593Smuzhiyun# 'GENERAL_REGS'" error. -O2 works fine.
32*4882a593Smuzhiyunifeq ($(BR2_sh):$(BR2_STATIC_LIBS):$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),y:y:)
33*4882a593SmuzhiyunASSIMP_CXXFLAGS += -O2
34*4882a593Smuzhiyunendif
35*4882a593Smuzhiyun
36*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
37*4882a593SmuzhiyunASSIMP_CXXFLAGS += -O0
38*4882a593Smuzhiyunendif
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunASSIMP_CONF_OPTS += -DASSIMP_BUILD_TESTS=OFF \
41*4882a593Smuzhiyun	-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) $(ASSIMP_CXXFLAGS)"
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun$(eval $(cmake-package))
44