11-include .config
2+ include mk/deps.mk
23
34# Set default goal explicitly
45.DEFAULT_GOAL := all
@@ -93,18 +94,18 @@ libtwin.a_files-y += src/screen-ops.c
9394# Renderer implementations (draw-builtin.c includes all compositing operations)
9495libtwin.a_files-$(CONFIG_RENDERER_BUILTIN) += src/draw-builtin.c
9596libtwin.a_files-$(CONFIG_RENDERER_PIXMAN) += src/draw-pixman.c
96- libtwin.a_cflags-$(CONFIG_RENDERER_PIXMAN) += $(shell pkg-config -- cflags pixman-1)
97+ libtwin.a_cflags-$(CONFIG_RENDERER_PIXMAN) += $(call dep, cflags, pixman-1)
9798ifeq ($(CONFIG_RENDERER_PIXMAN ) , y)
98- TARGET_LIBS += $(shell pkg-config -- libs pixman-1)
99+ TARGET_LIBS += $(call dep, libs, pixman-1)
99100endif
100101
101102# Image loaders
102103
103104ifeq ($(CONFIG_LOADER_JPEG ) , y)
104105libtwin.a_files-y += src/image-jpeg.c
105106ifneq ($(CC_IS_EMCC ) , 1)
106- libtwin.a_cflags-y += $(shell pkg-config -- cflags libjpeg)
107- TARGET_LIBS += $(shell pkg-config -- libs libjpeg)
107+ libtwin.a_cflags-y += $(call dep, cflags, libjpeg)
108+ TARGET_LIBS += $(call dep, libs, libjpeg)
108109else
109110# Emscripten libjpeg port - flags needed for both compile and link
110111libtwin.a_cflags-y += -sUSE_LIBJPEG=1
@@ -115,8 +116,8 @@ endif
115116ifeq ($(CONFIG_LOADER_PNG ) , y)
116117libtwin.a_files-y += src/image-png.c
117118ifneq ($(CC_IS_EMCC ) , 1)
118- libtwin.a_cflags-y += $(shell pkg-config -- cflags libpng)
119- TARGET_LIBS += $(shell pkg-config -- libs libpng)
119+ libtwin.a_cflags-y += $(call dep, cflags, libpng)
120+ TARGET_LIBS += $(call dep, libs, libpng)
120121else
121122# Emscripten libpng port (includes zlib) - flags needed for both compile and link
122123libtwin.a_cflags-y += -sUSE_LIBPNG=1 -sUSE_ZLIB=1
@@ -155,8 +156,8 @@ BACKEND := none
155156ifeq ($(CONFIG_BACKEND_SDL ) , y)
156157BACKEND = sdl
157158libtwin.a_files-y += backend/sdl.c
158- libtwin.a_cflags-y += $(shell sdl2-config -- cflags)
159- TARGET_LIBS += $(shell sdl2-config -- libs)
159+ libtwin.a_cflags-y += $(call dep, cflags,sdl2 )
160+ TARGET_LIBS += $(call dep, libs,sdl2 )
160161endif
161162
162163ifeq ($(CONFIG_BACKEND_FBDEV ) , y)
@@ -170,8 +171,8 @@ ifeq ($(CONFIG_BACKEND_VNC), y)
170171BACKEND = vnc
171172libtwin.a_files-y += backend/vnc.c
172173libtwin.a_files-y += src/cursor.c
173- libtwin.a_cflags-y += $(shell pkg-config -- cflags neatvnc aml pixman-1)
174- TARGET_LIBS += $(shell pkg-config -- libs neatvnc aml pixman-1)
174+ libtwin.a_cflags-y += $(call dep, cflags, neatvnc aml pixman-1)
175+ TARGET_LIBS += $(call dep, libs, neatvnc aml pixman-1)
175176endif
176177
177178ifeq ($(CONFIG_BACKEND_HEADLESS ) , y)
@@ -251,11 +252,11 @@ font-edit_files-y = \
251252 tools/font-edit/font-edit.c
252253font-edit_includes-y := tools/font-edit
253254font-edit_cflags-y := \
254- $(shell pkg-config -- cflags cairo) \
255- $(shell sdl2-config -- cflags)
255+ $(call dep, cflags, cairo) \
256+ $(call dep, cflags,sdl2 )
256257font-edit_ldflags-y := \
257- $(shell pkg-config -- libs cairo) \
258- $(shell sdl2-config -- libs) \
258+ $(call dep, libs, cairo) \
259+ $(call dep, libs,sdl2 ) \
259260 -lm
260261
261262# Headless control tool
0 commit comments