2014-02-10 01:10:30 +00:00
|
|
|
Import('env')
|
2016-05-22 00:07:34 +00:00
|
|
|
Import('env_drivers')
|
2014-02-10 01:10:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
png_sources = [
|
|
|
|
"png/example.c",
|
|
|
|
"png/png.c",
|
|
|
|
"png/pngerror.c",
|
|
|
|
"png/pngget.c",
|
|
|
|
"png/pngmem.c",
|
|
|
|
"png/pngpread.c",
|
|
|
|
"png/pngread.c",
|
|
|
|
"png/pngrio.c",
|
|
|
|
"png/pngrtran.c",
|
|
|
|
"png/pngrutil.c",
|
|
|
|
"png/pngset.c",
|
|
|
|
"png/pngtrans.c",
|
|
|
|
"png/pngwio.c",
|
|
|
|
"png/pngwrite.c",
|
|
|
|
"png/pngwtran.c",
|
|
|
|
"png/pngwutil.c",
|
|
|
|
"png/resource_saver_png.cpp",
|
|
|
|
"png/image_loader_png.cpp"
|
|
|
|
]
|
|
|
|
|
2016-03-07 12:20:32 +00:00
|
|
|
# Currently .ASM filter_neon.S does not compile on NT.
|
|
|
|
import os
|
|
|
|
if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt":
|
2016-05-22 00:07:34 +00:00
|
|
|
env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"])
|
2014-02-10 01:10:30 +00:00
|
|
|
env_neon = env.Clone();
|
|
|
|
if "S_compiler" in env:
|
|
|
|
env_neon['CC'] = env['S_compiler']
|
2015-12-23 11:27:00 +00:00
|
|
|
#env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"])
|
2016-03-07 12:20:32 +00:00
|
|
|
png_sources.append(env_neon.Object("#drivers/png/arm/arm_init.c"))
|
|
|
|
png_sources.append(env_neon.Object("#drivers/png/arm/filter_neon.S"))
|
2015-12-23 11:27:00 +00:00
|
|
|
else:
|
2016-05-22 00:07:34 +00:00
|
|
|
env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"])
|
2014-02-10 01:10:30 +00:00
|
|
|
|
|
|
|
env.drivers_sources+=png_sources
|
|
|
|
|
|
|
|
#env.add_source_files(env.drivers_sources, png_sources)
|
|
|
|
|
|
|
|
Export('env')
|