summaryrefslogtreecommitdiff
path: root/v4l2-drm-example/Makefile
blob: 6d1c1e40406e5dc521e2b25826aa0c87f0a178e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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