c42c94d3a34e3a38c1d74cc0adfe6804d62f2aae
[openwrt/staging/mkresin.git] / package / utils / adb / Makefile
1 include $(TOPDIR)/rules.mk
2 #Based on adb package from AUR https://aur.archlinux.org/packages/adb/ , reused Makefile
3
4 PKG_NAME:=adb
5 PKG_VERSION:=android.5.0.2_r1
6 PKG_RELEASE:=1
7
8 PKG_SOURCE_PROTO:=git
9 PKG_SOURCE_URL:=https://android.googlesource.com/platform/system/core
10 PKG_SOURCE_VERSION:=6fe92d1a3fb17545d82d020a3c995f32e6b71f9d
11 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
12 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
13 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
14 PKG_MAINTAINER:=Henryk Heisig <hyniu@o2.pl>
15
16 include $(INCLUDE_DIR)/package.mk
17
18 ifeq ($(CONFIG_BIG_ENDIAN),y)
19 TARGET_CFLAGS+= -DHAVE_BIG_ENDIAN=1
20 endif
21 TARGET_CFLAGS+= -D_GNU_SOURCE
22
23 define Package/adb
24 SECTION:=utils
25 CATEGORY:=Utilities
26 TITLE:=Android Debug Bridge CLI tool
27 URL:=http://tools.android.com/
28 DEPENDS:=+zlib +libopenssl +libpthread
29 endef
30
31 define Package/adb/description
32 Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device.
33 endef
34
35 # Nothing just to be sure
36 #define Build/Configure
37 #endef
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR)/adb/ \
41 $(TARGET_CONFIGURE_OPTS) \
42 TARGET=Linux \
43 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
44 LDFLAGS="$(TARGET_LDFLAGS)"
45 endef
46
47 define Package/adb/install
48 $(INSTALL_DIR) $(1)/usr/bin
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/adb/adb $(1)/usr/bin/
50 endef
51
52 $(eval $(call BuildPackage,adb))