diff options
| author | Mikhail Burakov <mburakov@mailbox.org> | 2023-03-18 18:25:36 +0100 | 
|---|---|---|
| committer | Mikhail Burakov <mburakov@mailbox.org> | 2023-03-18 18:25:36 +0100 | 
| commit | 8d32de4648dd9659d3bfdd252d03f713211f4f8b (patch) | |
| tree | 1e0b920d77706c3cd67afd9c50695ffbc149e977 /makefile | |
Initial import of receiver source code
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 42 | 
1 files changed, 42 insertions, 0 deletions
| 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) | 
