From ae16b4a1bfaff76cee8fe9d155acd36162ecd9ff Mon Sep 17 00:00:00 2001 From: shinyquagsire23 Date: Fri, 5 Nov 2021 11:35:57 -0700 Subject: [PATCH] Use pkg-config everywhere --- .github/workflows/build.yml | 2 +- INSTALL.md | 2 ++ tools/nitrogfx/Makefile | 9 ++------- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ecf6a019..6f8c57dde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: run: | sudo apt update sudo ACCEPT_EULA=Y apt -y --fix-missing --allow-downgrades upgrade - sudo apt -y --allow-downgrades install g++-8-multilib linux-libc-dev binutils-arm-none-eabi p7zip-full + sudo apt -y --allow-downgrades install g++-8-multilib linux-libc-dev binutils-arm-none-eabi p7zip-full pkg-config sudo dpkg --add-architecture i386 wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add - sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport diff --git a/INSTALL.md b/INSTALL.md index 6dbfdb704..e2ecdd941 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,6 +21,7 @@ Building the ROM requires the following packages: * wine (to run the mwcc executables) * python3 (for asm preprocessor) * libpng-devel (libpng-dev on Ubuntu) +* pkg-config NOTE: If you are using Arch/Manjaro or Void you will only need base-devel instead of build-essentials or make or git. You will still need wine. @@ -48,6 +49,7 @@ You will still require the following packages: * git * build-essentials * libpng-devel +* pkg-config Install them using either the Cygwin package manager or using pacman on Msys2. diff --git a/tools/nitrogfx/Makefile b/tools/nitrogfx/Makefile index e295879e4..f2dea6c0e 100644 --- a/tools/nitrogfx/Makefile +++ b/tools/nitrogfx/Makefile @@ -1,13 +1,8 @@ CC = gcc -CFLAGS = -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK +CFLAGS = -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK $(shell pkg-config --cflags libpng) -UNAME_S := $(shell uname -s) -ifeq ($(UNAME_S),Darwin) -CFLAGS += $(shell pkg-config --cflags libpng) $(shell pkg-config --libs libpng) -endif - -LIBS = -lpng -lz +LIBS = -lpng -lz $(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