1
override CPPFLAGS += -I../include -fvisibility=hidden
3
LIBS_libv4l1 = -lpthread
5
V4L1_OBJS = libv4l1.o log.o
6
V4L1COMPAT = v4l1compat.so
7
V4L1COMPAT_O = v4l1compat.o libv4l1.so
8
TARGETS = $(V4L1_LIB) libv4l1.pc
9
INCLUDES = ../include/libv4l1.h ../include/libv4l1-videodev.h
11
ifeq ($(LINKTYPE),static)
13
V4L1_DEPS = $(V4L1_OBJS)
16
V4L1_DEPS += $(V4L1_OBJS) ../libv4l2/libv4l2.so
17
TARGETS += $(V4L1COMPAT)
18
override CPPFLAGS += -fPIC
23
-include $(V4L1_OBJS:.o=.d)
25
$(V4L1_LIB): $(V4L1_DEPS)
27
$(V4L1COMPAT): $(V4L1COMPAT_O) $(V4L1_LIB)
30
@echo prefix=$(PREFIX) > libv4l1.pc
31
@echo libdir=$(LIBDIR) >> libv4l1.pc
33
@echo 'Name: libv4l1' >> libv4l1.pc
34
@echo 'Description: v4l1 compatibility library' >> libv4l1.pc
35
@echo 'Version: '$(V4L_UTILS_VERSION) >> libv4l1.pc
36
@echo 'Requires.private: libv4l2' >> libv4l1.pc
37
@echo 'Libs: -L$${libdir} -lv4l1' >> libv4l1.pc
38
@echo 'Libs.private: -lpthread' >> libv4l1.pc
39
@echo 'Cflags: -I$${prefix}/include' >> libv4l1.pc
42
mkdir -p $(DESTDIR)$(PREFIX)/include
43
install -p -m 644 $(INCLUDES) $(DESTDIR)$(PREFIX)/include
44
ifeq ($(LINKTYPE),static)
45
mkdir -p $(DESTDIR)$(LIBDIR)
46
install -m 644 $(V4L1_LIB) $(DESTDIR)$(LIBDIR)
48
mkdir -p $(DESTDIR)$(LIBDIR)/$(LIBSUBDIR)
49
install -m 755 $(V4L1_LIB).$(LIB_RELEASE) $(DESTDIR)$(LIBDIR)
50
cd $(DESTDIR)$(LIBDIR) && \
51
ln -f -s $(V4L1_LIB).$(LIB_RELEASE) $(V4L1_LIB)
52
install -m 755 $(V4L1COMPAT).$(LIB_RELEASE) \
53
$(DESTDIR)$(LIBDIR)/$(LIBSUBDIR)/$(V4L1COMPAT)
55
mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
56
install -m 644 libv4l1.pc $(DESTDIR)$(LIBDIR)/pkgconfig
58
include ../../Make.rules