Use pkg-config for compiler options.

Fix some issues with the image2pdf example code.
This commit is contained in:
Michael R Sweet
2025-02-11 20:22:36 -05:00
parent e686669b9d
commit 4e89137689
2 changed files with 13 additions and 4 deletions

View File

@ -14,8 +14,8 @@
# Common options
CFLAGS = -g $(CPPFLAGS)
#CFLAGS = -g -fsanitize=address $(CPPFLAGS)
CPPFLAGS = -I.. -I/usr/local/include
LIBS = -L.. -L/usr/local/lib -lpdfio -lz -lm
CPPFLAGS = -I.. $(shell PKG_CONFIG_PATH="..:$(PKG_CONFIG_PATH)" pkg-config pdfio --cflags)
LIBS = -L.. $(shell PKG_CONFIG_PATH="..:$(PKG_CONFIG_PATH)" pkg-config pdfio --libs)
# Targets