From 8d32de4648dd9659d3bfdd252d03f713211f4f8b Mon Sep 17 00:00:00 2001 From: Mikhail Burakov Date: Sat, 18 Mar 2023 18:25:36 +0100 Subject: Initial import of receiver source code --- makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..24bc614 --- /dev/null +++ b/makefile @@ -0,0 +1,42 @@ +bin:=$(notdir $(shell pwd)) +src:=$(wildcard *.c) +obj:=$(src:.c=.o) + +libs:=\ + libva \ + libva-drm \ + mfx \ + wayland-client + +protocols_dir:=\ + /usr/share/wayland-protocols + +protocols:=\ + linux-dmabuf-unstable-v1 \ + xdg-shell + +obj:=$(patsubst %,%.o,$(protocols)) $(obj) +headers:=$(patsubst %,%.h,$(protocols)) +CFLAGS+=$(shell pkg-config --cflags $(libs)) +LDFLAGS+=$(shell pkg-config --libs $(libs)) + +all: $(bin) + +$(bin): $(obj) + $(CC) $^ $(LDFLAGS) -o $@ + +%.o: %.c *.h $(headers) + $(CC) -c $< $(CFLAGS) -o $@ + +%.h: $(protocols_dir)/*/*/%.xml + wayland-scanner client-header $< $@ + +%.c: $(protocols_dir)/*/*/%.xml + wayland-scanner private-code $< $@ + +clean: + -rm $(bin) $(obj) $(headers) + +.PHONY: all clean + +.PRECIOUS: $(headers) -- cgit v1.2.3