2020-10-26 17:18:48 +01:00
|
|
|
############################################################################
|
2021-06-16 10:29:25 +02:00
|
|
|
# apps/system/adb/Makefile
|
2020-10-26 17:18:48 +01:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
include $(APPDIR)/Make.defs
|
|
|
|
|
2022-03-02 19:39:11 +01:00
|
|
|
ADBD_URL ?= "https://github.com/spiriou/microADB/archive"
|
2023-02-08 20:31:53 +01:00
|
|
|
ADBD_VERSION ?= 305007e0e574e7cc2b8d706b0f5d8cc76675fc51
|
2020-10-26 17:18:48 +01:00
|
|
|
|
2022-03-02 19:39:11 +01:00
|
|
|
ADB_DIR := $(APPDIR)/system/adb
|
2020-10-26 17:18:48 +01:00
|
|
|
ADB_UNPACKNAME := microADB
|
|
|
|
ADB_UNPACKDIR := $(ADB_DIR)/$(ADB_UNPACKNAME)
|
|
|
|
|
|
|
|
$(ADB_UNPACKDIR):
|
|
|
|
@echo "Downloading: $(ADB_UNPACKNAME)"
|
2022-03-02 19:39:11 +01:00
|
|
|
$(Q) curl -O -L $(ADBD_URL)/$(ADBD_VERSION).zip
|
|
|
|
$(Q) unzip -o $(ADBD_VERSION).zip
|
|
|
|
$(call DELFILE, $(ADBD_VERSION).zip)
|
|
|
|
$(call MOVEFILE, $(ADB_UNPACKNAME)-$(ADBD_VERSION), $(ADB_UNPACKDIR))
|
2020-10-26 17:18:48 +01:00
|
|
|
|
|
|
|
# adb server app
|
|
|
|
|
|
|
|
PROGNAME := $(CONFIG_ADBD_PROGNAME)
|
|
|
|
PRIORITY := $(CONFIG_ADBD_PRIORITY)
|
|
|
|
STACKSIZE := $(CONFIG_ADBD_STACKSIZE)
|
|
|
|
MODULE := $(CONFIG_ADB_SERVER)
|
|
|
|
|
|
|
|
# Files
|
|
|
|
|
|
|
|
MAINSRC := adb_main.c
|
|
|
|
CSRCS += adb_banner.c
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/adb_client.c
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/adb_frame.c
|
|
|
|
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/hal/hal_uv.c
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/hal/hal_uv_packet.c
|
|
|
|
|
|
|
|
CFLAGS += -I$(ADB_UNPACKNAME)
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_ADBD_TCP_SERVER),y)
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/hal/hal_uv_client_tcp.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_ADBD_USB_SERVER),y)
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/hal/hal_uv_client_usb.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_ADBD_AUTHENTICATION),y)
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/adb_auth_key.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_ADBD_FILE_SERVICE),y)
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/file_sync_service.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_ADBD_LOGCAT_SERVICE),y)
|
|
|
|
CSRCS += logcat_service.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_ADBD_SHELL_SERVICE),y)
|
2022-01-23 09:04:06 +01:00
|
|
|
CSRCS += $(ADB_UNPACKNAME)/hal/shell_service_uv.c
|
2020-10-26 17:18:48 +01:00
|
|
|
endif
|
|
|
|
|
2022-03-14 16:52:37 +01:00
|
|
|
ifeq ($(CONFIG_ADBD_SOCKET_SERVICE),y)
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/tcp_service.c
|
|
|
|
CSRCS += $(ADB_UNPACKNAME)/hal/hal_uv_socket.c
|
|
|
|
endif
|
|
|
|
|
2020-10-26 17:18:48 +01:00
|
|
|
clean::
|
|
|
|
$(call DELFILE, $(OBJS))
|
|
|
|
|
2022-08-27 08:15:16 +02:00
|
|
|
# Download and unpack tarball if no git repo found
|
|
|
|
ifeq ($(wildcard $(ADB_UNPACKDIR)/.git),)
|
|
|
|
context:: $(ADB_UNPACKDIR)
|
|
|
|
|
2020-10-26 17:18:48 +01:00
|
|
|
distclean::
|
|
|
|
$(call DELDIR, $(ADB_UNPACKDIR))
|
2022-08-27 08:15:16 +02:00
|
|
|
endif
|
2020-10-26 17:18:48 +01:00
|
|
|
|
|
|
|
include $(APPDIR)/Application.mk
|