Use pkg-config everywhere

This commit is contained in:
shinyquagsire23 2021-11-05 11:35:57 -07:00
parent 8fb8ac2665
commit ae16b4a1bf
3 changed files with 5 additions and 8 deletions

View File

@ -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

View File

@ -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.

View File

@ -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