From ba7202457fec51d31da4d23a1840813952f30f31 Mon Sep 17 00:00:00 2001 From: shinyquagsire23 Date: Fri, 5 Nov 2021 19:58:55 -0700 Subject: Update build scripts for MacOS Monterey; Use pkg-config on all platforms; MacOS no longer needs static libc++fs; Use gsed on MacOS --- tools/knarc/Makefile | 2 +- tools/mwasmarm_patcher/Makefile | 2 +- tools/nitrobanner/Makefile | 3 ++- tools/nitrogfx/Makefile | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/knarc/Makefile b/tools/knarc/Makefile index 0e0a0920..24e0de7d 100644 --- a/tools/knarc/Makefile +++ b/tools/knarc/Makefile @@ -8,7 +8,7 @@ else C_SRCS := UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) -LDFLAGS += -lstdc++ -lc++ -lc /usr/local/opt/llvm@8/lib/libc++fs.a +LDFLAGS += -lstdc++ -lc++ -lc -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM else LDFLAGS += -lstdc++fs endif diff --git a/tools/mwasmarm_patcher/Makefile b/tools/mwasmarm_patcher/Makefile index 26df548c..bff3a677 100644 --- a/tools/mwasmarm_patcher/Makefile +++ b/tools/mwasmarm_patcher/Makefile @@ -2,7 +2,7 @@ UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) -CC := gcc-5 +CC := clang else CC := gcc endif diff --git a/tools/nitrobanner/Makefile b/tools/nitrobanner/Makefile index 322525bd..9b751776 100644 --- a/tools/nitrobanner/Makefile +++ b/tools/nitrobanner/Makefile @@ -5,7 +5,8 @@ LDFLAGS += -lstdc++fs else UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) -LDFLAGS += -lstdc++ -lc++ -lc /usr/local/opt/llvm@8/lib/libc++fs.a +CXXFLAGS += -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM +LDFLAGS += -lstdc++ -lc++ -lc else LDFLAGS += -lstdc++fs endif diff --git a/tools/nitrogfx/Makefile b/tools/nitrogfx/Makefile index 18ecdbba..16b2632d 100644 --- a/tools/nitrogfx/Makefile +++ b/tools/nitrogfx/Makefile @@ -1,8 +1,8 @@ CC = gcc -CFLAGS = -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK -D_CRT_SECURE_NO_WARNINGS +CFLAGS = -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK $(shell pkg-config --cflags libpng) -LIBS = -lpng -lz +LIBS = $(shell pkg-config --libs libpng) SRCS = main.c convert_png.c gfx.c jasc_pal.c lz.c rl.c util.c font.c huff.c json.c cJSON.c -- cgit v1.2.3