From b4be0067e5cad859852d6b56551a98d3614126c5 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 8 Dec 2017 23:09:51 +0200 Subject: v4l2-drm-example: Add Makefile Signed-off-by: Laurent Pinchart --- v4l2-drm-example/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 v4l2-drm-example/Makefile diff --git a/v4l2-drm-example/Makefile b/v4l2-drm-example/Makefile new file mode 100644 index 0000000..6d1c1e4 --- /dev/null +++ b/v4l2-drm-example/Makefile @@ -0,0 +1,21 @@ +CROSS_COMPILE ?= +KDIR ?= +LIBDRM_DIR ?= + +CC := $(CROSS_COMPILE)gcc +CFLAGS ?= -O2 -W -Wall -std=gnu99 -I$(KDIR)/usr/include -I$(LIBDRM_DIR)/usr/include -I$(LIBDRM_DIR)/usr/include/libdrm +LDFLAGS ?= -L$(LIBDRM_DIR)/usr/lib +LIBS := -lrt -ldrm + +%.o : %.c + $(CC) $(CFLAGS) -c -o $@ $< + +all: dmabuf-sharing + +dmabuf-sharing: dmabuf-sharing.o + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + +clean: + -rm -f *.o + -rm -f dmabuf-sharing + -- cgit v1.2.3