~ubuntu-branches/ubuntu/oneiric/v4l-utils/oneiric

« back to all changes in this revision

Viewing changes to .pc/generate-correct-private-libs-lines-for-pkgconfig.diff/lib/libv4l1/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-07-22 13:58:48 UTC
  • mfrom: (11.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110722135848-tju3x5jlpa4e9by5
Tags: 0.8.5-1ubuntu1
debian/control: Drop ia32-libs-dev build dependency; we don't have this in
Ubuntu, and ia32-libs is in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
override CPPFLAGS += -I../include -fvisibility=hidden
2
 
 
3
 
LIBS_libv4l1  = -lpthread
4
 
 
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
10
 
 
11
 
ifeq ($(LINKTYPE),static)
12
 
V4L1_LIB      = libv4l1.a
13
 
V4L1_DEPS     = $(V4L1_OBJS)
14
 
else
15
 
V4L1_LIB      = libv4l1.so
16
 
V4L1_DEPS    += $(V4L1_OBJS) ../libv4l2/libv4l2.so
17
 
TARGETS      += $(V4L1COMPAT)
18
 
override CPPFLAGS += -fPIC
19
 
endif
20
 
 
21
 
all: $(TARGETS)
22
 
 
23
 
-include $(V4L1_OBJS:.o=.d)
24
 
 
25
 
$(V4L1_LIB): $(V4L1_DEPS)
26
 
 
27
 
$(V4L1COMPAT): $(V4L1COMPAT_O) $(V4L1_LIB)
28
 
 
29
 
libv4l1.pc:
30
 
        @echo prefix=$(PREFIX) > libv4l1.pc
31
 
        @echo libdir=$(LIBDIR) >> libv4l1.pc
32
 
        @echo >> 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
40
 
 
41
 
install: all
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)
47
 
else
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)
54
 
endif
55
 
        mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
56
 
        install -m 644 libv4l1.pc $(DESTDIR)$(LIBDIR)/pkgconfig
57
 
 
58
 
include ../../Make.rules