diff options
author | Mateusz Krawczuk <m.krawczuk@samsung.com> | 2015-07-06 16:36:14 +0200 |
---|---|---|
committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2015-07-09 15:55:05 +0200 |
commit | 364160b45c3303efba4e225be6ebeec8f09095f9 (patch) | |
tree | 53b362dd100d6b6b5c048bc4e3342fc28381f75c | |
parent | f1e15d5437a0f1078e071f5bc2da761b0500bf45 (diff) |
Makefiles update
v4l2-dmabuf-test
v4l2-mfc-encoder
v4l2-mfc-example
Signed-off-by: Mateusz Krawczuk <m.krawczuk@samsung.com>
-rw-r--r-- | v4l2-dmabuf-test/Makefile | 7 | ||||
-rw-r--r-- | v4l2-mfc-encoder/Makefile | 8 | ||||
-rw-r--r-- | v4l2-mfc-example/Makefile | 17 |
3 files changed, 19 insertions, 13 deletions
diff --git a/v4l2-dmabuf-test/Makefile b/v4l2-dmabuf-test/Makefile index cfd7436..330ec1c 100644 --- a/v4l2-dmabuf-test/Makefile +++ b/v4l2-dmabuf-test/Makefile @@ -1,8 +1,11 @@ +ifeq ($(KERNELHEADERS_PREFIX),) +$(warning KERNELHEADERS_PREFIX is not set, the build may fail due to lack of kernel headers) +endif + CROSS_COMPILE ?= arm-linux-gnueabi- -KDIR ?= /usr/src/linux CC=$(CROSS_COMPILE)gcc OBJS = v4l2-dbuf -CFLAGS += -I$(KDIR)/usr/include -std=gnu99 -Wall -pedantic -O2 +CFLAGS += -I$(KERNELHEADERS_PREFIX)/include -std=gnu99 -Wall -O2 all: $(OBJS) diff --git a/v4l2-mfc-encoder/Makefile b/v4l2-mfc-encoder/Makefile index d18ba17..d79666a 100644 --- a/v4l2-mfc-encoder/Makefile +++ b/v4l2-mfc-encoder/Makefile @@ -16,9 +16,13 @@ # limitations under the License. # +ifeq ($(KERNELHEADERS_PREFIX),) +$(warning KERNELHEADERS_PREFIX is not set, the build may fail due to lack of kernel headers) +endif + # Toolchain path TCPATH = arm-linux-gnueabi- -KERNELHEADERS = /home/kamil/praca/w1-party/kernel/headers/include +KERNELHEADERS = -I$(KERNELHEADERS_PREFIX) CC = ${TCPATH}gcc AR = "${TCPATH}ar rc" @@ -30,7 +34,7 @@ INCLUDES = -I$(KERNELHEADERS) SOURCES = main.c args.c in_demo.c out_file.c mfc.c io_dev.c func_dev.c v4l_dev.c in_camera.c OBJECTS := $(SOURCES:.c=.o) EXEC = mfc-encode -CFLAGS = -Wall -g -DS5PC1XX_FIMC +CFLAGS = -Wall -g DEP = .dep all: $(EXEC) $(DEP) diff --git a/v4l2-mfc-example/Makefile b/v4l2-mfc-example/Makefile index 131ebaf..9fbe3fb 100644 --- a/v4l2-mfc-example/Makefile +++ b/v4l2-mfc-example/Makefile @@ -27,19 +27,18 @@ $(warning KERNELHEADERS_PREFIX is not set, the build may fail due to lack of ker endif # Toolchain path -TCPATH = arm-linux-gnueabi- -#TCPATH = -KERNELHEADERS = -I$(KERNELHEADERS_PREFIX) -DRMHEADERS = -I$(LIBDRM_PREFIX)/include/ \ - -I$(LIBDRM_PREFIX)/include/libdrm/ \ +CROSS_COMPILE ?= arm-linux-gnueabi- +KERNELHEADERS = -I$(KERNELHEADERS_PREFIX)/include +DRMHEADERS = -I$(LIBDRM_PREFIX)/include \ + -I$(LIBDRM_PREFIX)/include/libdrm \ -I$(LIBDRM_PREFIX)/include/exynos \ -I./ LIBRARIES = -L$(LIBDRM_PREFIX)/lib/ LIBS = -ldrm -CC = ${TCPATH}gcc -AR = "${TCPATH}ar rc" -AR2 = ${TCPATH}ranlib make +CC = ${CROSS_COMPILE}gcc +AR = "${CROSS_COMPILE}ar rc" +AR2 = ${CROSS_COMPILE}ranlib make INCLUDES = $(KERNELHEADERS) $(DRMHEADERS) @@ -51,7 +50,7 @@ INCLUDES = $(KERNELHEADERS) $(DRMHEADERS) SOURCES = main.c fileops.c args.c parser.c fb.c fimc.c mfc.c queue.c drm.c gem.c ipp.c OBJECTS := $(SOURCES:.c=.o) EXEC = v4l2_decode -CFLAGS = -Wall -g -DS5PC1XX_FIMC -lm +CFLAGS = -Wall -g -lm #-Os all: $(EXEC) |