-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce GNU Makefile to build adbd for non-Android targets
- Loading branch information
Yoann Sculo
committed
Jul 3, 2014
1 parent
f61439d
commit 921d4c6
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*~ | ||
tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.o | ||
adbd | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# adbd | ||
|
||
SRCS+=adb.c | ||
SRCS+=fdevent.c | ||
SRCS+=transport.c | ||
SRCS+=transport_local.c | ||
SRCS+=transport_usb.c | ||
SRCS+=sockets.c | ||
SRCS+=services.c | ||
SRCS+=file_sync_service.c | ||
SRCS+=jdwp_service.c | ||
SRCS+=framebuffer_service.c | ||
SRCS+=remount_service.c | ||
SRCS+=usb_linux_client.c | ||
SRCS+=log_service.c | ||
SRCS+=utils.c | ||
|
||
VPATH+= ../libcutils | ||
SRCS+= array.c | ||
SRCS+= hashmap.c | ||
SRCS+= properties.c | ||
SRCS+= threads.c | ||
SRCS+= socket_inaddr_any_server.c | ||
SRCS+= socket_local_client.c | ||
SRCS+= socket_local_server.c | ||
SRCS+= socket_loopback_client.c | ||
SRCS+= socket_loopback_server.c | ||
SRCS+= socket_network_client.c | ||
SRCS+= load_file.c | ||
|
||
CPPFLAGS+= -DADB_HOST=0 | ||
CPPFLAGS+= -DHAVE_PTHREADS | ||
CPPFLAGS+= -D_XOPEN_SOURCE -D_GNU_SOURCE | ||
CPPFLAGS+= -fPIC | ||
CPPFLAGS+= -I . | ||
CPPFLAGS+= -I ../include | ||
CPPFLAGS+= -I ../zlib | ||
CPPFLAGS+= -I $(OPENSSL_DIR)/include | ||
|
||
CPPFLAGS+= -L $(OPENSSL_DIR) | ||
|
||
CFLAGS+= -O2 -g -Wall -Wno-unused-parameter | ||
LDFLAGS= -static | ||
|
||
LIBS= -lrt -lpthread -lcrypto -ldl -L $(OPENSSL_DIR) | ||
|
||
CC=$(TOOLCHAIN)gcc | ||
LD=$(TOOLCHAIN)gcc | ||
STRIP=$(TOOLCHAIN)strip | ||
|
||
OBJS= $(SRCS:.c=.o) | ||
|
||
all: adbd | ||
|
||
adbd: $(OBJS) | ||
$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) | ||
$(STRIP) adbd | ||
|
||
clean: | ||
rm -rf $(OBJS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
adbd for non-Android devices | ||
---------------------------- | ||
|
||
To build adbd you need to specify your toolchain and openssl path to build adbd | ||
|
||
export TOOLCHAIN=<your_toolchain_path_with_prefix> | ||
export OPENSSL_DIR=<path_to_openssl> | ||
make | ||
|
||
Thanks to: | ||
|
||
- https://hev.cc/2227.html | ||
- http://android.serverbox.ch/?p=1217 | ||
- http://events.linuxfoundation.org/images/stories/pdf/lf_abs12_kobayashi.pdf | ||
|
||
Contact | ||
------- | ||
|
||
Yoann Sculo <[email protected]> |