This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

The error of make file

Today, I want to write the V4L2 programme, but I do not know how to write make file,  I try to write one, but it failed, can any one tell me what's wrong with it, thank you very much.

# Makefile for v4l2 application

CC = /opt/arm-2009q1/bin/arm-none-linux-gnueabi-gcc
CFLAGS = -I/home/chemi/dvsdk/git/include/
all:v4l2_userptr_loopback
v4l2_userptr_loopback: v4l2_userptr_loopback.o
    $(CC) -o v4l2_userptr_loopback
v4l2_userptr_loopback.o:v4l2_userptr_loopback.c
    $(CC) -c $(CFLAGS) v4l2_userptr_loopback.c
clean:
    rm -f *.o

There is no errors in the path of CC and CFLAGES

The result is like that:

chemi@chemi-Latitude-D630:~/workdir/filesys/opt/v4l2_test$ make
/opt/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -c -I/home/chemi/dvsdk/git/include/ v4l2_userptr_loopback.c
v4l2_userptr_loopback.c:59:35: error: media/davinci/tvp514x.h: No such file or directory
v4l2_userptr_loopback.c:65:36: error: asm/arch/imp_previewer.h: No such file or directory

  • You might want to refer to the make file in this link. You have to specify correct kernel include path.

    http://arago-project.org/git/projects/?p=examples-davinci.git;a=blob;f=v4l2/Makefile;h=45542e6744fad15dc2d469db6a1d32c428d68b26;hb=ffbe85626735f3773801811a3e58d6f17e17bbe7