heads/modules/libpng
Thierry Laurion 907e906f01
Pass -O3 and -O2 (optimize for speed) to -Os (Optimize for space)
Adresses @easrentai suggestion to pass modules build optimization for space here: #590 (comment)

- Uniformized module's $(CROSS_TOOLS) being passed as environment variable, prior of ./configure call

Doesn't work for:
- busybox (HOSTCXXFLAGS="-Os" attempted prior of ./configure call)
- zlib (CFLAGS="-Os" attempted prior of ./configure call)
- npth (CFLAGS="-Os" attempted prior of ./configure call)
2023-03-07 18:05:39 -05:00

25 lines
595 B
Makefile

modules-$(CONFIG_CAIRO) += libpng
libpng_version := 1.6.34
libpng_dir := libpng-$(libpng_version)
libpng_tar := libpng-$(libpng_version).tar.gz
libpng_url := https://github.com/glennrp/libpng-releases/raw/master/$(libpng_tar)
libpng_hash := 574623a4901a9969080ab4a2df9437026c8a87150dfd5c235e28c94b212964a7
libpng_configure := \
$(CROSS_TOOLS) \
CFLAGS="-Os" \
./configure \
--host $(MUSL_ARCH)-elf-linux \
--prefix="/" \
libpng_target := \
$(MAKE_JOBS) \
$(CROSS_TOOLS) \
DESTDIR="$(INSTALL)" \
install \
libpng_libraries := .libs/libpng16.so.16
libpng_depends := zlib $(musl_dep)