From 00369ab8ef5047f4fd43c57efd112d7d5717000d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 11 Sep 2024 15:38:46 -0400 Subject: [PATCH] Sync fix for libpng on macOS --- tools/gbagfx/Makefile | 2 ++ tools/rsfont/Makefile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/gbagfx/Makefile b/tools/gbagfx/Makefile index f0638414da..9f13763391 100644 --- a/tools/gbagfx/Makefile +++ b/tools/gbagfx/Makefile @@ -1,8 +1,10 @@ CC = gcc CFLAGS = -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK +CFLAGS += $(shell pkg-config --cflags libpng) LIBS = -lpng -lz +LDFLAGS += $(shell pkg-config --libs-only-L libpng) SRCS = main.c convert_png.c gfx.c jasc_pal.c lz.c rl.c util.c font.c huff.c diff --git a/tools/rsfont/Makefile b/tools/rsfont/Makefile index 041ee0c437..f17253c8d9 100644 --- a/tools/rsfont/Makefile +++ b/tools/rsfont/Makefile @@ -1,8 +1,10 @@ CC = gcc CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -s -DPNG_SKIP_SETJMP_CHECK +CFLAGS += $(shell pkg-config --cflags libpng) LIBS = -lpng -lz +LDFLAGS += $(shell pkg-config --libs-only-L libpng) SRCS = main.c convert_png.c util.c font.c