Make pkg-config user-definable

The Switch port relies on an alternate pkg-config
This commit is contained in:
Clownacy 2020-01-15 08:06:54 +00:00
parent 1c65eee284
commit a32593f51a

View file

@ -1,6 +1,7 @@
NATIVECC = cc NATIVECC = cc
NATIVECXX = c++ NATIVECXX = c++
WINDRES = windres WINDRES = windres
PKGCONFIG = pkg-config
BUILD_DIRECTORY = game BUILD_DIRECTORY = game
ASSETS_DIRECTORY = assets ASSETS_DIRECTORY = assets
@ -70,17 +71,17 @@ ifeq ($(WARNINGS_FATAL), 1)
endif endif
ALL_CFLAGS += -std=c99 -MMD -MP -MF $@.d ALL_CFLAGS += -std=c99 -MMD -MP -MF $@.d
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 $@.d ALL_CXXFLAGS += -std=c++98 -MMD -MP -MF $@.d
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) ifeq ($(STATIC), 1)
ALL_LDFLAGS += -static 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) DOCONFIG_LIBS += $(shell fltk-config --cxxflags --libs --ldstaticflags)
else 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) DOCONFIG_LIBS += $(shell fltk-config --cxxflags --libs --ldflags)
endif endif