shithub: cstory

Download patch

ref: a32593f51a6f4d3bec4dad5803c8c252fd5e4056
parent: 1c65eee2846566e28bde39d6cb547581be015b0f
author: Clownacy <[email protected]>
date: Wed Jan 15 03:06:54 EST 2020

Make pkg-config user-definable

The Switch port relies on an alternate pkg-config

--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 NATIVECC = cc
 NATIVECXX = c++
 WINDRES = windres
+PKGCONFIG = pkg-config
 
 BUILD_DIRECTORY = game
 ASSETS_DIRECTORY = assets
@@ -70,17 +71,17 @@
 endif
 
 ALL_CFLAGS += -std=c99 -MMD -MP -MF [email protected]
-CSE2_CFLAGS += $(shell pkg-config sdl2 --cflags) $(shell pkg-config freetype2 --cflags)
+CSE2_CFLAGS += $(shell $(PKGCONFIG) sdl2 --cflags) $(shell $(PKGCONFIG) freetype2 --cflags)
 
 ALL_CXXFLAGS += -std=c++98 -MMD -MP -MF [email protected]
-CSE2_CXXFLAGS += $(shell pkg-config sdl2 --cflags) $(shell pkg-config freetype2 --cflags)
+CSE2_CXXFLAGS += $(shell $(PKGCONFIG) sdl2 --cflags) $(shell $(PKGCONFIG) freetype2 --cflags)
 
 ifeq ($(STATIC), 1)
   ALL_LDFLAGS += -static
-  CSE2_LIBS += $(shell pkg-config sdl2 --libs --static) $(shell pkg-config freetype2 --libs --static) -lfreetype
+  CSE2_LIBS += $(shell $(PKGCONFIG) sdl2 --libs --static) $(shell $(PKGCONFIG) freetype2 --libs --static) -lfreetype
   DOCONFIG_LIBS += $(shell fltk-config --cxxflags --libs --ldstaticflags)
 else
-  CSE2_LIBS += $(shell pkg-config sdl2 --libs) $(shell pkg-config freetype2 --libs)
+  CSE2_LIBS += $(shell $(PKGCONFIG) sdl2 --libs) $(shell $(PKGCONFIG) freetype2 --libs)
   DOCONFIG_LIBS += $(shell fltk-config --cxxflags --libs --ldflags)
 endif