-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (49 loc) · 1.59 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# v4l2n - Video4Linux2 API tool for developers.
#
# Copyright (c) 2015 Intel Corporation. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version
# 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# CC=arm-linux-gnueabi-gcc
CC=gcc
OPT = -Wall -m32 -static -g -I.
PROGS = v4l2n v4l2n-example raw2pnm pnm2raw yuv2yuv pnm2yuv txt2raw pnm2txt
.PHONY: all clean
all: $(PROGS)
v4l2n: v4l2n.c v4l2n.h extradefs.h linux/videodev2.h linux/v4l2-subdev.h linux/v4l2-controls.h linux/v4l2-common.h linux/compiler.h linux/atomisp.h
$(CC) -c $(OPT) $@.c -o lib$@.o
$(CC) $(OPT) lib$@.o -o $@
v4l2n-example: v4l2n
$(CC) $(OPT) $@.c -o $@ libv4l2n.o
raw2pnm: raw2pnm.c extradefs.h
$(CC) $(OPT) $@.c -o $@
pnm2raw: pnm2raw.c utillib.o
$(CC) $(OPT) utillib.o $@.c -o $@
yuv2yuv: yuv2yuv.c
$(CC) $(OPT) $@.c -o $@
pnm2yuv: pnm2yuv.c utillib.o
$(CC) $(OPT) utillib.o $@.c -o $@
txt2raw: txt2raw.c utillib.o
$(CC) $(OPT) utillib.o $@.c -o $@
pnm2txt: pnm2txt.c utillib.o
$(CC) $(OPT) utillib.o $@.c -o $@
utillib.o: utillib.c
$(CC) $(OPT) -c $< -o $@
clean:
rm -f $(PROGS) utillib.o
.PHONY: release
release:
$(MAKE) clean
$(MAKE) all
rm -rfv RELEASE
mkdir -p RELEASE/v4l2n
cp README $(PROGS) RELEASE/v4l2n
cd RELEASE && zip -r -9 -m ../v4l2n-`date +%Y%m%d`.zip v4l2n