forked from ldcsaa/HP-Socket
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
413 changed files
with
119,585 additions
and
33 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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,8 @@ | ||
@echo off | ||
|
||
set CURPATH=%cd% | ||
cd %~dp0 | ||
|
||
call ndk-build NDK_PROJECT_PATH=./project/android-ndk NDK_LIBS_OUT=./lib/android-ndk NDK_OUT=./lib/android-ndk/obj %* | ||
|
||
cd %CURPATH% |
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,5 @@ | ||
#!/bin/bash | ||
|
||
cd $(cd "$(dirname "$0")"; pwd) | ||
|
||
ndk-build NDK_PROJECT_PATH=./project/android-ndk NDK_LIBS_OUT=./lib/android-ndk NDK_OUT=./lib/android-ndk/obj $@ |
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,108 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
ROOT_PATH := $(LOCAL_PATH) | ||
DEPT_PATH := $(LOCAL_PATH)/../dependent/android-ndk/$(TARGET_ARCH_ABI) | ||
DEPT_INC_PATH := $(DEPT_PATH)/include | ||
DEPT_LIB_PATH := $(DEPT_PATH)/lib | ||
HP_LIB_PATH := $(LOCAL_PATH)/../lib/android-ndk/$(TARGET_ARCH_ABI) | ||
|
||
MY_C_INCLUDES := $(LOCAL_PATH)/../include | ||
MY_CFLAGS := -w -fpic -fvisibility=hidden -fno-strict-aliasing -Wall -Wextra -Wswitch -Wno-deprecated-declarations -Wno-empty-body -Wno-conversion -Wno-sign-conversion -Wno-sign-compare -Wreturn-type -Wparentheses -Wno-pointer-sign -Wno-format -Wno-missing-braces -Wuninitialized -Wunreachable-code -Wunused-function -Wunused-value -Wunused-variable -Wno-unused-parameter -Wno-missing-field-initializers | ||
MY_CPPFLAGS := -fexceptions -frtti -fthreadsafe-statics -Wno-reorder -Wno-inconsistent-missing-override | ||
MY_LDFLAGS := -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-Bsymbolic | ||
MY_WHOLE_STATIC_LIBRARIES := ssl crypto iconv | ||
MY_LDLIBS := -lz -lm | ||
|
||
# local lib : iconv | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := iconv | ||
LOCAL_SRC_FILES := $(DEPT_LIB_PATH)/libiconv.a | ||
LOCAL_EXPORT_C_INCLUDES := $(DEPT_INC_PATH) | ||
include $(PREBUILT_STATIC_LIBRARY) | ||
|
||
# local lib : crypto | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := crypto | ||
LOCAL_SRC_FILES := $(DEPT_LIB_PATH)/libcrypto.a | ||
LOCAL_EXPORT_C_INCLUDES := $(DEPT_INC_PATH) | ||
include $(PREBUILT_STATIC_LIBRARY) | ||
|
||
# local lib : ssl | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := ssl | ||
LOCAL_SRC_FILES := $(DEPT_LIB_PATH)/libssl.a | ||
LOCAL_EXPORT_C_INCLUDES := $(DEPT_INC_PATH) | ||
include $(PREBUILT_STATIC_LIBRARY) | ||
|
||
# local lib : hpsocket | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hpsocket | ||
LOCAL_SRC_FILES := $(HP_LIB_PATH)/libhpsocket.a | ||
include $(PREBUILT_STATIC_LIBRARY) | ||
|
||
# local lib : hpsocket4c | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hpsocket4c | ||
LOCAL_SRC_FILES := $(HP_LIB_PATH)/libhpsocket4c.a | ||
include $(PREBUILT_STATIC_LIBRARY) | ||
|
||
# local lib : hpsocket_so | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hpsocket_so | ||
LOCAL_SRC_FILES := $(HP_LIB_PATH)/libhpsocket.so | ||
include $(PREBUILT_SHARED_LIBRARY) | ||
|
||
# local lib : hpsocket4c_so | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hpsocket4c_so | ||
LOCAL_SRC_FILES := $(HP_LIB_PATH)/libhpsocket4c.so | ||
include $(PREBUILT_SHARED_LIBRARY) | ||
|
||
### build all demos ### | ||
include $(call all-makefiles-under,$(ROOT_PATH)) | ||
|
||
### build single demo ### | ||
|
||
# #testecho | ||
# include $(ROOT_PATH)/testecho/Android.mk | ||
|
||
# #testecho-arq | ||
# include $(ROOT_PATH)/testecho-arq/Android.mk | ||
|
||
# #testecho-arq-pfm | ||
# include $(ROOT_PATH)/testecho-arq-pfm/Android.mk | ||
|
||
##testecho-http | ||
#include $(ROOT_PATH)/testecho-http/Android.mk | ||
|
||
# #testecho-http-4c(4c so) | ||
#include $(ROOT_PATH)/testecho-http-4c/Android.mk | ||
|
||
##testecho-lib(so & 4c so) | ||
#include $(ROOT_PATH)/testecho-lib/Android.mk | ||
|
||
##testecho-pack | ||
#include $(ROOT_PATH)/testecho-pack/Android.mk | ||
|
||
##testecho-pfm | ||
#include $(ROOT_PATH)/testecho-pfm/Android.mk | ||
|
||
##testecho-pull | ||
#include $(ROOT_PATH)/testecho-pull/Android.mk | ||
|
||
##testecho-ssl | ||
# include $(ROOT_PATH)/testecho-ssl/Android.mk | ||
|
||
##testecho-ssl-pack(4c so) | ||
#include $(ROOT_PATH)/testecho-ssl-pack/Android.mk | ||
|
||
##testecho-ssl-pfm(so) | ||
#include $(ROOT_PATH)/testecho-ssl-pfm/Android.mk | ||
|
||
##testecho-ssl-pull(so) | ||
#include $(ROOT_PATH)/testecho-ssl-pull/Android.mk | ||
|
||
##testecho-udp | ||
#include $(ROOT_PATH)/testecho-udp/Android.mk | ||
|
||
##testecho-udp-pfm | ||
#include $(ROOT_PATH)/testecho-udp-pfm/Android.mk |
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,6 @@ | ||
APP_ABI := all # armeabi-v7a arm64-v8a x86 x86_64 | ||
APP_PLATFORM := android-21 | ||
APP_CFLAGS := -std=c11 -DNDEBUG -g0 -O3 -fomit-frame-pointer | ||
APP_CPPFLAGS := -std=c++14 | ||
APP_STL := c++_static | ||
APP_BUILD_SCRIPT := Android.mk |
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,8 @@ | ||
@echo off | ||
|
||
set CURPATH=%cd% | ||
cd %~dp0 | ||
|
||
call ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=./Application.mk NDK_LIBS_OUT=./Release/android-ndk NDK_OUT=./Release/android-ndk/obj %* | ||
|
||
cd %CURPATH% |
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,6 @@ | ||
#!/bin/bash | ||
|
||
cd $(cd "$(dirname "$0")"; pwd) | ||
|
||
ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=./Application.mk NDK_LIBS_OUT=./Release/android-ndk NDK_OUT=./Release/android-ndk/obj $@ | ||
|
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,26 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
# target lib : hp-testecho-arq-pfm-server | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-arq-pfm-server | ||
LOCAL_SRC_FILES := server/server.cpp \ | ||
../global/helper.cpp | ||
LOCAL_WHOLE_STATIC_LIBRARIES := $(MY_WHOLE_STATIC_LIBRARIES) hpsocket | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_USE_HP_LIB -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
include $(BUILD_EXECUTABLE) | ||
|
||
# target lib : hp-testecho-arq-pfm-client | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-arq-pfm-client | ||
LOCAL_SRC_FILES := client/client.cpp \ | ||
../global/helper.cpp | ||
LOCAL_WHOLE_STATIC_LIBRARIES := $(MY_WHOLE_STATIC_LIBRARIES) hpsocket | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_USE_HP_LIB -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
include $(BUILD_EXECUTABLE) | ||
|
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,26 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
# target lib : hp-testecho-arq-server | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-arq-server | ||
LOCAL_SRC_FILES := server/server.cpp \ | ||
../global/helper.cpp | ||
LOCAL_WHOLE_STATIC_LIBRARIES := $(MY_WHOLE_STATIC_LIBRARIES) hpsocket | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
include $(BUILD_EXECUTABLE) | ||
|
||
# target lib : hp-testecho-arq-client | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-arq-client | ||
LOCAL_SRC_FILES := client/client.cpp \ | ||
../global/helper.cpp | ||
LOCAL_WHOLE_STATIC_LIBRARIES := $(MY_WHOLE_STATIC_LIBRARIES) hpsocket | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
include $(BUILD_EXECUTABLE) | ||
|
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,69 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
# target lib : hp-testecho-http-4c-server | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-http-4c-server | ||
LOCAL_SRC_FILES := server/server.cpp \ | ||
../global/helper.cpp \ | ||
../../src/common/crypto/Crypto.cpp \ | ||
../../src/common/FileHelper.cpp \ | ||
../../src/common/FuncHelper.cpp \ | ||
../../src/common/SysHelper.cpp \ | ||
../../src/common/Thread.cpp | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_USE_HP_LIB -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
LOCAL_SHARED_LIBRARIES:=hpsocket4c_so | ||
include $(BUILD_EXECUTABLE) | ||
|
||
# target lib : hp-testecho-http-4c-client | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-http-4c-client | ||
LOCAL_SRC_FILES := client/client.cpp \ | ||
../global/helper.cpp \ | ||
../../src/common/crypto/Crypto.cpp \ | ||
../../src/common/FileHelper.cpp \ | ||
../../src/common/FuncHelper.cpp \ | ||
../../src/common/SysHelper.cpp \ | ||
../../src/common/Thread.cpp | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_USE_HP_LIB -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
LOCAL_SHARED_LIBRARIES:=hpsocket4c_so | ||
include $(BUILD_EXECUTABLE) | ||
|
||
# target lib : hp-testecho-http-4c-agent | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-http-4c-agent | ||
LOCAL_SRC_FILES := agent/agent.cpp \ | ||
../global/helper.cpp \ | ||
../../src/common/crypto/Crypto.cpp \ | ||
../../src/common/FileHelper.cpp \ | ||
../../src/common/FuncHelper.cpp \ | ||
../../src/common/SysHelper.cpp \ | ||
../../src/common/Thread.cpp | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_USE_HP_LIB -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
LOCAL_SHARED_LIBRARIES:=hpsocket4c_so | ||
include $(BUILD_EXECUTABLE) | ||
|
||
# target lib : hp-testecho-http-4c-syncclient | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-http-4c-syncclient | ||
LOCAL_SRC_FILES := syncclient/syncclient.cpp \ | ||
../global/helper.cpp \ | ||
../../src/common/crypto/Crypto.cpp \ | ||
../../src/common/FileHelper.cpp \ | ||
../../src/common/FuncHelper.cpp \ | ||
../../src/common/SysHelper.cpp \ | ||
../../src/common/Thread.cpp | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_USE_HP_LIB -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
LOCAL_SHARED_LIBRARIES:=hpsocket4c_so | ||
include $(BUILD_EXECUTABLE) |
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,49 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
# target lib : hp-testecho-http-server | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-http-server | ||
LOCAL_SRC_FILES := server/server.cpp \ | ||
../global/helper.cpp | ||
LOCAL_WHOLE_STATIC_LIBRARIES := $(MY_WHOLE_STATIC_LIBRARIES) hpsocket | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
include $(BUILD_EXECUTABLE) | ||
|
||
# target lib : hp-testecho-http-client | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-http-client | ||
LOCAL_SRC_FILES := client/client.cpp \ | ||
../global/helper.cpp | ||
LOCAL_WHOLE_STATIC_LIBRARIES := $(MY_WHOLE_STATIC_LIBRARIES) hpsocket | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
include $(BUILD_EXECUTABLE) | ||
|
||
# target lib : hp-testecho-http-agent | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-http-agent | ||
LOCAL_SRC_FILES := agent/agent.cpp \ | ||
../global/helper.cpp | ||
LOCAL_WHOLE_STATIC_LIBRARIES := $(MY_WHOLE_STATIC_LIBRARIES) hpsocket | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
include $(BUILD_EXECUTABLE) | ||
|
||
# target lib : hp-testecho-http-syncclient | ||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := hp-testecho-http-syncclient | ||
LOCAL_SRC_FILES := syncclient/syncclient.cpp \ | ||
../global/helper.cpp | ||
LOCAL_WHOLE_STATIC_LIBRARIES := $(MY_WHOLE_STATIC_LIBRARIES) hpsocket | ||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES) | ||
LOCAL_CFLAGS := $(MY_CFLAGS) -D_NEED_SSL -D_NEED_HTTP | ||
LOCAL_CPPFLAGS := $(MY_CPPFLAGS) | ||
LOCAL_LDLIBS := $(MY_LDLIBS) | ||
include $(BUILD_EXECUTABLE) |
Oops, something went wrong.