From 1c79dfed2c973b159b8f4a39a8087f772b70ceb0 Mon Sep 17 00:00:00 2001 From: Mikhail Burakov Date: Tue, 14 Mar 2023 08:40:53 +0100 Subject: Initial import of streamer source code --- makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..c3146b8 --- /dev/null +++ b/makefile @@ -0,0 +1,39 @@ +bin:=$(notdir $(shell pwd)) +src:=$(shell ls *.c) +obj:=$(src:.c=.o) + +libs:=\ + egl \ + glesv2 \ + libavcodec \ + libavutil \ + libdrm \ + libva + +res:=\ + vertex.glsl \ + luma.glsl \ + chroma.glsl + + +CFLAGS+=$(shell pkg-config --cflags $(libs)) +LDFLAGS+=$(shell pkg-config --libs $(libs)) + +comma:=, +LDFLAGS+= \ + -Wl,--format=binary \ + $(patsubst %,-Wl$(comma)%,$(res)) \ + -Wl,--format=default + +all: $(bin) + +$(bin): $(obj) + $(CC) $^ $(LDFLAGS) -o $@ + +%.o: %.c *.h $(res) + $(CC) -c $< $(CFLAGS) -o $@ + +clean: + -rm $(bin) $(obj) + +.PHONY: all clean -- cgit v1.2.3