diff --git a/Makefile b/Makefile index 6975b84..42bc929 100755 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ all:cmake clean: @if [ -d "cmake-shell" ]; then \ echo "cmake-shell exist"; \ + make -C cmake-shell External_lib_clean; \ make -C cmake-shell clean; \ fi @echo "IPC clean." diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 9544ade..74bfa4e 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,2 +1,9 @@ -add_subdirectory(sqlite3/sqlite-3430000) \ No newline at end of file +add_subdirectory(sqlite3/sqlite-3430000) +add_subdirectory(goahead-5.2.0) + +add_custom_target( + External_lib_clean + COMMAND rm -rf goahead-5.2.0/GoAhead + WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH} +) \ No newline at end of file diff --git a/external/README.md b/external/README.md index 9d9c297..a6b2d9d 100644 --- a/external/README.md +++ b/external/README.md @@ -1,3 +1,7 @@ # 1. 第三方库 -   该目录存放仓库依赖的三方库源码。 \ No newline at end of file +   该目录存放仓库依赖的三方库源码。 + +## 1.1. goahead + +make CC=arm-rockchip830-linux-uclibcgnueabihf-gcc ARCH=arm PROFILE=static \ No newline at end of file diff --git a/external/goahead-5.2.0/CMakeLists.txt b/external/goahead-5.2.0/CMakeLists.txt new file mode 100644 index 0000000..c7bdf87 --- /dev/null +++ b/external/goahead-5.2.0/CMakeLists.txt @@ -0,0 +1,27 @@ +include(${CMAKE_SOURCE_DIR_IPCSDK}/build/global_config.cmake) +set(EXECUTABLE_OUTPUT_PATH ${EXEC_OUTPUT_PATH}) +set(LIBRARY_OUTPUT_PATH ${LIBS_OUTPUT_PATH}) + +if(${TARGET_PLATFORM} MATCHES ${DEFINE_LINUX}) + SET(SET_ARCH "x86") +else() + SET(SET_ARCH "arm") +endif() +# build goahead before make libgo.a +add_custom_command( + OUTPUT ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/GoAhead/Makefile + COMMAND echo "tar zxvf goahead-5.2.0.tar.gz" + COMMAND tar zxvf goahead-5.2.0.tar.gz + WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/ +) +add_custom_command( + OUTPUT ${EXTERNAL_LIBS_OUTPUT_PATH}/libgo.a + DEPENDS ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/GoAhead/Makefile + COMMAND make CC=${CMAKE_C_COMPILER} ARCH=${SET_ARCH} PROFILE=static + COMMAND mv ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/GoAhead/build/linux-${SET_ARCH}-static/bin/libgo.a ${EXTERNAL_LIBS_OUTPUT_PATH}/libgo.a + WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/GoAhead +) +add_custom_target( + libgo.a + DEPENDS ${EXTERNAL_LIBS_OUTPUT_PATH}/libgo.a +) \ No newline at end of file diff --git a/external/goahead-5.2.0/goahead-5.2.0.tar.gz b/external/goahead-5.2.0/goahead-5.2.0.tar.gz new file mode 100644 index 0000000..5936e74 Binary files /dev/null and b/external/goahead-5.2.0/goahead-5.2.0.tar.gz differ