forked from madeye/proxydroid
/
Android.mk
executable file
·162 lines (126 loc) · 4.03 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed 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.
#
#
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LIBEVENT_SOURCES := \
buffer.c \
bufferevent.c bufferevent_filter.c \
bufferevent_openssl.c bufferevent_pair.c bufferevent_ratelim.c \
bufferevent_sock.c epoll.c \
epoll_sub.c evdns.c event.c \
event_tagging.c evmap.c \
evrpc.c evthread.c \
evthread_pthread.c evutil.c \
evutil_rand.c http.c \
listener.c log.c poll.c \
select.c signal.c strlcpy.c
LOCAL_MODULE := event
LOCAL_SRC_FILES := $(addprefix libevent/, $(LIBEVENT_SOURCES))
LOCAL_CFLAGS := -O2 -g -I$(LOCAL_PATH)/libevent \
-I$(LOCAL_PATH)/libevent/include \
-I$(LOCAL_PATH)/openssl/include
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
REDSOCKS_SOURCES := base.c dnstc.c http-connect.c \
log.c md5.c socks5.c \
base64.c http-auth.c http-relay.c main.c \
parser.c redsocks.c socks4.c utils.c
LOCAL_STATIC_LIBRARIES := libevent
LOCAL_MODULE := redsocks
LOCAL_SRC_FILES := $(addprefix redsocks/, $(REDSOCKS_SOURCES))
LOCAL_CFLAGS := -O2 -std=gnu99 -g -I$(LOCAL_PATH)/redsocks \
-I$(LOCAL_PATH)/libevent/include \
-I$(LOCAL_PATH)/libevent
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
SPDYLAY_SOURCES := spdylay_buffer.c \
spdylay_client_cert_vector.c \
spdylay_frame.c \
spdylay_gzip.c \
spdylay_helper.c \
spdylay_map.c \
spdylay_npn.c \
spdylay_outbound_item.c \
spdylay_pq.c \
spdylay_queue.c \
spdylay_session.c \
spdylay_stream.c \
spdylay_submit.c \
spdylay_zlib.c
LOCAL_STATIC_LIBRARIES := libevent libcrypto
LOCAL_MODULE := spdylay
LOCAL_SRC_FILES := $(addprefix spdylay/, $(SPDYLAY_SOURCES))
LOCAL_CFLAGS := -DHAVE_CONFIG_H -O2 -g -I$(LOCAL_PATH)/spdylay \
-I$(LOCAL_PATH)/spdylay/includes \
-I$(LOCAL_PATH)/libevent/include \
-I$(LOCAL_PATH)/libevent \
-I$(LOCAL_PATH)/openssl/include
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
SHRPX_SOURCES := util.cc spdylay_ssl.cc \
spdylay_config.h shrpx_config.cc \
shrpx_listen_handler.cc \
shrpx_client_handler.cc \
shrpx_spdy_upstream.cc \
shrpx_https_upstream.cc \
shrpx_downstream_queue.cc \
shrpx_downstream.cc \
shrpx_downstream_connection.cc \
shrpx_http_downstream_connection.cc \
shrpx_spdy_downstream_connection.cc \
shrpx_spdy_session.cc \
shrpx_log.cc shrpx_http.cc \
shrpx_io_control.cc \
shrpx_ssl.cc shrpx_thread_event_receiver.cc \
shrpx_worker.cc \
shrpx_accesslog.cc http-parser/http_parser.c \
shrpx.cc
LOCAL_STATIC_LIBRARIES := libevent libssl libcrypto libspdylay
LOCAL_LDLIBS := -lz
LOCAL_MODULE := shrpx
LOCAL_SRC_FILES := $(addprefix shrpx/, $(SHRPX_SOURCES))
LOCAL_CFLAGS := -O2 -g -I$(LOCAL_PATH)/spdylay \
-I$(LOCAL_PATH)/spdylay/includes \
-I$(LOCAL_PATH)/shrpx \
-I$(LOCAL_PATH)/libevent/include \
-I$(LOCAL_PATH)/libevent \
-I$(LOCAL_PATH)/openssl/include
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := libev
LOCAL_CFLAGS += -O2 -DNDEBUG -DHAVE_CONFIG_H
LOCAL_SRC_FILES := \
libev/ev.c \
libev/event.c
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := shadowsocks
LOCAL_SRC_FILES := shadowsocks/local.c shadowsocks/encrypt.c
LOCAL_CFLAGS := -Wall -O2 -fno-strict-aliasing -I$(LOCAL_PATH)/libev/ -I$(LOCAL_PATH)/openssl/include
LOCAL_STATIC_LIBRARIES := libev libcrypto
LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE:= exec
LOCAL_SRC_FILES:= \
termExec.cpp
LOCAL_LDLIBS := -ldl -llog
include $(BUILD_SHARED_LIBRARY)
subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \
crypto \
ssl \
))
include $(subdirs)