| ifeq ($(OPENWRT_BUILD_ADBD),) |
| export STAGING_DIR=../../openwrt/staging_dir |
| else |
| export STAGING_DIR=$(TOPDIR)/staging_dir |
| endif |
| ifeq ($(ADB_OVER_PCIE),) |
| ADB_OVER_PCIE=0 |
| endif |
| |
| COMMON_SRC_FILES := \ |
| adb.c \ |
| fdevent.c \ |
| transport.c \ |
| transport_local.c \ |
| sockets.c \ |
| services.c |
| ifeq ($(ADB_OVER_PCIE),1) |
| COMMON_SRC_FILES+= transport_pcie.c |
| else |
| COMMON_SRC_FILES+= transport_usb.c |
| endif |
| |
| # adbd device daemon |
| # ========================================================= |
| |
| ADBD_SRC_FILES := \ |
| file_sync_service.c \ |
| adb_auth_client.c \ |
| jdwp_service.c \ |
| framebuffer_service.c \ |
| remount_service.c |
| ifneq ($(ADB_OVER_PCIE),1) |
| ADBD_SRC_FILES+= usb_linux_client.c |
| endif |
| |
| LOCAL_SRC_FILES += \ |
| properties.c \ |
| load_file.c \ |
| socket_inaddr_any_server.c \ |
| socket_local_client.c \ |
| socket_local_server.c \ |
| socket_loopback_client.c \ |
| socket_loopback_server.c \ |
| socket_network_client.c \ |
| sha.c \ |
| rsa.c \ |
| sha256.c \ |
| logd_write.c \ |
| thread_utils.c \ |
| b64_pton.c |
| |
| LOCAL_CFLAGS := \ |
| -O2 \ |
| -g \ |
| -D_XOPEN_SOURCE \ |
| -D_GNU_SOURCE \ |
| -Wall -Wno-unused-parameter -Wno-deprecated-declarations \ |
| -DADB_NON_ANDROID=1 \ |
| -DALLOW_ADBD_ROOT=1 \ |
| -DHAVE_PTHREADS \ |
| -DDEBUG_PACKETS=1 |
| |
| ifeq ($(ADB_OVER_PCIE),1) |
| LOCAL_CFLAGS+= -DADB_OVER_PCIE=1 |
| endif |
| |
| CPPFLAGS+= -DDZONE -DHAVE_FORKEXEC=1 -DHAVE_SYMLINKS -DHAVE_TERMIO_H |
| CPPFLAGS+= -D_GNU_SOURCE -D_XOPEN_SOURCE |
| CPPFLAGS+= -I. -I./include |
| CPPFLAGS+= $(LOCAL_CFLAGS) |
| |
| LIBS += -lpthread -luci -llynq-log -llynq-uci |
| |
| LOCAL_MODULE := adbd |
| LOCAL_SRC_FILES+= $(COMMON_SRC_FILES) $(ADBD_SRC_FILES) |
| CPPFLAGS+= -DADB_HOST=0 |
| |
| OBJS=$(LOCAL_SRC_FILES:.c=.o) |
| |
| all: $(LOCAL_MODULE) |
| |
| $(LOCAL_MODULE): $(OBJS) |
| $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) |
| |
| clean: |
| rm -rf $(OBJS) $(LOCAL_MODULE) |