summaryrefslogtreecommitdiff
path: root/v4l2-drm-example
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-drm-example')
-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
+