trying a different approach; upgrading pupload.c
This commit is contained in:
parent
c2749c2d12
commit
28ed56e130
|
|
@ -16,6 +16,7 @@ link_directories(${Boost_LIBRARY_DIR})
|
|||
set (CMAKE_C_FLAGS "-fPIC -g")
|
||||
set (PCLSYNC_PATH ${CMAKE_SOURCE_DIR}/lib/pclsync)
|
||||
set (MBEDTLS_PATH ${CMAKE_SOURCE_DIR}/lib/mbedtls-1.3.10)
|
||||
set (MBEDTLS2_PATH ${CMAKE_SOURCE_DIR}/lib/mbedtls-2.1.14)
|
||||
set (CMD_PATH ${CMAKE_SOURCE_DIR}/cmd/pcloudcc)
|
||||
|
||||
#add_subdirectory(${MBEDTLS_PATH})
|
||||
|
|
@ -32,6 +33,12 @@ add_custom_target(
|
|||
WORKING_DIRECTORY ${MBEDTLS_PATH}
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
mbedtls2
|
||||
COMMAND cmake . && make
|
||||
WORKING_DIRECTORY ${MBEDTLS2_PATH}
|
||||
)
|
||||
|
||||
set (OVERLAY_CLENT_PATH ${CMAKE_SOURCE_DIR}/lib/poverlay_linux)
|
||||
include_directories(${OVERLAY_CLENT_PATH})
|
||||
|
||||
|
|
@ -40,6 +47,9 @@ add_library(pcloudcc_lib SHARED ${CMD_PATH}/pclsync_lib_c.cpp ${CMD_PATH}/pclsyn
|
|||
target_link_libraries(pcloudcc_lib
|
||||
${PCLSYNC_PATH}/psynclib.a
|
||||
${MBEDTLS_PATH}/build/library/libmbedtls.a
|
||||
${MBEDTLS2_PATH}/build/library/libmbedcrypto.a
|
||||
${MBEDTLS2_PATH}/build/library/libmbedx509.a
|
||||
${MBEDTLS2_PATH}/build/library/libmbedtls.a
|
||||
fuse
|
||||
pthread
|
||||
sqlite3
|
||||
|
|
@ -53,7 +63,7 @@ target_link_libraries(pcloudcc pcloudcc_lib)
|
|||
|
||||
target_link_libraries(pcloudcc ${Boost_LIBRARIES})
|
||||
|
||||
link_directories(${PCLSYNC_PATH} ${MBEDTLS_PATH}/build/library ${OVERLAY_CLENT_PATH})
|
||||
link_directories(${PCLSYNC_PATH} ${MBEDTLS_PATH}/build/library ${MBEDTLS2_PATH}/build/library ${OVERLAY_CLENT_PATH})
|
||||
|
||||
install(TARGETS pcloudcc RUNTIME DESTINATION bin)
|
||||
install(TARGETS pcloudcc_lib LIBRARY DESTINATION lib)
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -1,5 +1,7 @@
|
|||
all:
|
||||
make -C ./lib/pclsync fs
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -H./lib/mbedtls-1.3.10 -B./lib/mbedtls-1.3.10/build
|
||||
make -C ./lib/mbedtls-1.3.10/build
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -H./lib/mbedtls-2.1.14 -B./lib/mbedtls-2.1.14/build
|
||||
make -C ./lib/mbedtls-2.1.14/build
|
||||
mkdir -p ./cmd/pcloudcc/build
|
||||
|
|
@ -8,6 +10,7 @@ all:
|
|||
|
||||
clean:
|
||||
make -C lib/pclsync clean
|
||||
rm -rf lib/mbedtls-1.3.10/build
|
||||
rm -rf lib/mbedtls-2.1.14/build
|
||||
rm -rf ./cmd/pcloudcc/build
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ CFLAGS=-Werror -O2 -g -fno-stack-protector -fomit-frame-pointer -mtune=core2 -I.
|
|||
LIB_A=psynclib.a
|
||||
UNAME_S := $(shell uname -s)
|
||||
UNAME_V := $(shell uname -v)
|
||||
CFLAGS += -DP_OS_LINUX -D_FILE_OFFSET_BITS=64 -DP_SSL_MBEDTLS -I../mbedtls-1.3.10/include
|
||||
CFLAGS += -DP_OS_LINUX -D_FILE_OFFSET_BITS=64 -DP_SSL_MBEDTLS -I../mbedtls-1.3.10/include -I ../mbedtls-2.1.14/include
|
||||
LDFLAGS += -lssl -lcrypto -lfuse -lpthread -lsqlite3 -lzlib
|
||||
|
||||
OBJ=pcompat.o psynclib.o plocks.o plibs.o pcallbacks.o pdiff.o pstatus.o papi.o ptimer.o\
|
||||
|
|
|
|||
|
|
@ -29,14 +29,16 @@
|
|||
DAMAGE.
|
||||
*/
|
||||
|
||||
#include <polarssl/ctr_drbg.h>
|
||||
#include <polarssl/debug.h>
|
||||
#include <polarssl/entropy.h>
|
||||
#include <polarssl/pkcs5.h>
|
||||
#include <polarssl/ssl.h>
|
||||
#include <mbedtls/ctr_drbg.h>
|
||||
#include <mbedtls/debug.h>
|
||||
#include <mbedtls/entropy.h>
|
||||
#include <mbedtls/pkcs5.h>
|
||||
#include <mbedtls/ssl.h>
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "mbedtls/compat-1.3.h"
|
||||
|
||||
#include "papi.h"
|
||||
#include "pcallbacks.h"
|
||||
#include "pcompat.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue