aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
blob: 720d8e999909be95bb24109b67a4e98dcf5eac49 (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
CC			= @CC@
CXX			= @CXX@
V4L_UTILS_VERSION	= @V4L_UTILS_VERSION@
CFLAGS			= @CFLAGS@
WITH_LIBV4L		= @WITH_LIBV4L@
WITH_V4LUTILS		= @WITH_V4LUTILS@

LIBV4L_ARGS=
ifeq ($(WITH_LIBV4L),no)
ifeq ($(WITH_V4LUTILS),yes)
	LIBV4L_ARGS="LINKTYPE=static"
endif
endif

all:
  ifeq ($(WITH_LIBV4L),yes)
	echo with Libv4l $(LIBV4L_ARGS)
	$(MAKE) -C lib $(LIBV4L_ARGS) $@
  else ifeq ($(WITH_V4LUTILS),yes)
	echo with Libv4l static
	$(MAKE) -C lib $(LIBV4L_ARGS) $@
  endif
  ifeq ($(WITH_V4LUTILS),yes)
	$(MAKE) -C utils $(LIBV4L_ARGS) $@
  endif

install:
  ifeq ($(WITH_LIBV4L),yes)
	$(MAKE) -C lib $@
  endif
  ifeq ($(WITH_V4LUTILS),yes)
	$(MAKE) -C utils $@
  endif

sync-with-kernel:
	@if [ ! -f $(KERNEL_DIR)/include/linux/videodev2.h -o \
	      ! -f $(KERNEL_DIR)/include/linux/ivtv.h -o \
	      ! -f $(KERNEL_DIR)/include/media/v4l2-chip-ident.h ]; then \
	  echo "Error you must set KERNEL_DIR to point to an extracted kernel source dir"; \
	  exit 1; \
	fi
	cp -a $(KERNEL_DIR)/include/linux/videodev2.h include/linux
	cp -a $(KERNEL_DIR)/include/linux/ivtv.h include/linux
	cp -a $(KERNEL_DIR)/include/media/v4l2-chip-ident.h include/media
	$(MAKE) -C utils $@

clean::
	rm -f include/*/*~
	$(MAKE) -C lib $@
	$(MAKE) -C utils $@

tag:
	@git tag -a -m "Tag as v4l-utils-$(V4L_UTILS_VERSION)" v4l-utils-$(V4L_UTILS_VERSION)
	@echo "Tagged as v4l-utils-$(V4L_UTILS_VERSION)"

archive-no-tag:
	@git archive --format=tar --prefix=v4l-utils-$(V4L_UTILS_VERSION)/ v4l-utils-$(V4L_UTILS_VERSION) > v4l-utils-$(V4L_UTILS_VERSION).tar
	@bzip2 -f v4l-utils-$(V4L_UTILS_VERSION).tar

archive: clean tag archive-no-tag

export: clean
	tar --transform s/^\./v4l-utils-$(V4L_UTILS_VERSION)/g \
		--exclude=.git -jcvf \
		/tmp/v4l-utils-$(V4L_UTILS_VERSION).tar.bz2 .

include Make.rules

Privacy Policy