summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorMikhail Burakov <mburakov@mailbox.org>2024-11-29 18:43:18 +0100
committerMikhail Burakov <mburakov@mailbox.org>2024-11-29 18:43:18 +0100
commit143262bdba529c83f53a5d3ae6449d27873b1ab0 (patch)
tree11d3192ecb48cfa12978b3d9fed4efbd16b0cef6 /makefile
parente70354e3d504b3a1b40573b43ebf8f7cfd4b9e66 (diff)
Initial implementation on mfx stub (WIP)
Diffstat (limited to 'makefile')
-rw-r--r--makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/makefile b/makefile
index 59b74a6..b67ed97 100644
--- a/makefile
+++ b/makefile
@@ -13,7 +13,6 @@ libs:=\
libpipewire-0.3 \
libva \
libva-drm \
- mfx \
wayland-client
protocols_dir:=\
@@ -26,6 +25,17 @@ protocols:=\
relative-pointer-unstable-v1 \
xdg-shell
+ifdef USE_LIBMFX
+ libs+=mfx
+ CFLAGS+=-DUSE_LIBMFX
+else
+ obj+=\
+ mfx_stub/bitstream.o \
+ mfx_stub/mfxsession.o \
+ mfx_stub/mfxvideo.o
+ CFLAGS+=-Imfx_stub/include
+endif
+
obj:=$(patsubst %,%.o,$(protocols)) $(obj)
headers:=$(patsubst %,%.h,$(protocols))
CFLAGS+=$(shell pkg-config --cflags $(libs))
@@ -36,7 +46,7 @@ all: $(bin)
$(bin): $(obj)
$(CC) $^ $(LDFLAGS) -o $@
-%.o: %.c *.h $(headers)
+%.o: %.c *.h */*.h $(headers)
$(CC) -c $< $(CFLAGS) -o $@
%.h: $(protocols_dir)/*/*/%.xml