libmicrohttpd: build parallel
[feed/packages.git] / libs / libvpx / Makefile
1 #
2 # Copyright (C) 2008-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libvpx
11 PKG_VERSION:=1.4.0
12 PKG_RELEASE:=1
13
14 PKG_REV:=v$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
16 PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20
21 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
22
23 PKG_LICENSE:=BSD-3-Clause
24 PKG_LICENSE_FILES:=LICENSE
25
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/libvpx
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE:=libvpx
34 URL:=http://www.webmproject.org/
35 DEPENDS:=+libpthread
36 endef
37
38 define Package/libvpx/description
39 libvpx is a VP8/VP9 Codec SDK.
40 endef
41
42 CONFIGURE_ARGS = \
43 --target=generic-gnu \
44 --prefix=$(CONFIGURE_PREFIX) \
45 --libdir=/usr/lib \
46 --enable-static \
47 --enable-shared \
48 --disable-examples \
49 --disable-docs \
50 --disable-unit-tests \
51
52 # Add --enable-small as openwrt gcc flags are overwritten
53 ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
54 CONFIGURE_ARGS += --enable-small
55 endif
56
57 # libvpx expects gcc as linker but uses $LD if provided
58 # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
59 CONFIGURE_VARS += \
60 CROSS=$(GNU_TARGET_NAME) \
61 LD="$(TARGET_CC)" \
62
63 MAKE_FLAGS += \
64 LD="$(TARGET_CC)" \
65
66 define Build/InstallDev
67 $(INSTALL_DIR) $(1)/usr/include/vpx/
68 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/vpx/* $(1)/usr/include/vpx/
69 $(INSTALL_DIR) $(1)/usr/lib/
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/
71 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
72 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
73 endef
74
75 define Package/libvpx/install
76 $(INSTALL_DIR) $(1)/usr/lib/
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
78 endef
79
80 $(eval $(call BuildPackage,libvpx))