summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2017-12-08 23:09:51 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-13 07:31:44 +0300
commitb4be0067e5cad859852d6b56551a98d3614126c5 (patch)
tree1c20b435b5fa358ce51b6ff80bb7db179b98b056
parent64e61968bf2b78e43863caa69b3f232bc6618802 (diff)
v4l2-drm-example: Add MakefileHEADmaster
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--v4l2-drm-example/Makefile21
1 files changed, 21 insertions, 0 deletions
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
+