blob: 4b75d177e39118feb7667c3538258d545f27e9a0 (
plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
Fixing multiple QA issues
* respect user {CC,CXX,LD}FLAGS
* fix linking order
* make job server for install phase
Don't install ivtv-ctl (bug #333291) and v4l2-ctl (bug #278255)
Don't install duplicate kernel headers (bug #244584)
https://bugs.gentoo.org/show_bug.cgi?id=321303
Patch written by Kacper Kowalik <xarthisius.kk@gmail.com>
--- test/Makefile
+++ test/Makefile
@@ -7,13 +7,13 @@
ivtv-osd-dma-test ivtv-fb-colormap-test \
ivtv-fb-16-bit-test ps-analyzer
-CFLAGS = -I../utils -D_GNU_SOURCE -O2 -Wall
-CXXFLAGS = $(CFLAGS)
-LDFLAGS = -lm
+CFLAGS += -I../utils -D_GNU_SOURCE -Wall
+CXXFLAGS += -I../utils -D_GNU_SOURCE -Wall
+LDLIBS = -lm
all: $(EXES)
-install: all
+install:
clean:
rm -f *.o $(EXES)
--- utils/Makefile.orig 2010-05-24 15:35:11.321677941 +0000
+++ utils/Makefile 2010-05-24 15:35:15.595615306 +0000
@@ -9,41 +9,39 @@
X86_EXES := ivtvplay ivtv-mpegindex #ivtv-encoder
endif
-EXES := v4l2-ctl ivtv-ctl ivtv-radio $(X86_EXES)
+EXES := ivtv-radio $(X86_EXES)
BIN := $(EXES) ivtv-tune/ivtv-tune cx25840ctl/cx25840ctl
HEADERS := linux/ivtv.h linux/ivtvfb.h
-CFLAGS = -D_GNU_SOURCE -O2 -Wall -g -I.
-CXXFLAGS = $(CFLAGS)
+CFLAGS += -D_GNU_SOURCE -Wall -I.
+CXXFLAGS += -D_GNU_SOURCE -Wall -I.
-all:: $(EXES)
- $(MAKE) CFLAGS="$(CFLAGS)" -C ivtv-tune
- $(MAKE) CFLAGS="$(CFLAGS)" -C cx25840ctl
+all: $(EXES)
+ $(MAKE) $(MAKEOPTS) CFLAGS="$(CFLAGS)" -C ivtv-tune
+ $(MAKE) $(MAKEOPTS) CFLAGS="$(CFLAGS)" -C cx25840ctl
ivtv-ctl: ivtv-ctl.o
- $(CC) -lm -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lm
v4l2-ctl: v4l2-ctl.o
- $(CXX) -lm -o $@ $^
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lm
v4l2-dbg: v4l2-dbg.o v4l2-driverids.o v4l2-chipids.o
- $(CXX) -lm -o $@ $^
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lm
ivtvplay: ivtvplay.cc
- $(CXX) $(CXXFLAGS) -lm -lpthread -o $@ $^
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lm -lpthread
encoder.o: encoder.c
$(CC) $(CFLAGS) -DVIDEO_PORT=0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c $^
ivtv-encoder: enc_mindex.o enc_chann.o encoder.o
- $(CC) -lpthread -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lpthread
-install: all
- install -d $(DESTDIR)/$(HDRDIR)
- install -m 0644 $(HEADERS) $(DESTDIR)/$(HDRDIR)
+install:
install -d $(DESTDIR)/$(BINDIR)
install -m 0755 $(BIN) $(DESTDIR)/$(BINDIR)
--- Makefile
+++ Makefile
@@ -1,6 +1,6 @@
all clean install:
- make -C utils $@
- make -C test $@
+ $(MAKE) -C utils $@
+ $(MAKE) -C test $@
distclean: clean
|