mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-01-31 20:29:36 +08:00
fixed cmake
This commit is contained in:
parent
e890a6344c
commit
b16b37c879
@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.7)
|
|||||||
project(udp2raw_tunnel)
|
project(udp2raw_tunnel)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set_source_files_properties(lib/aes.c lib/md5.c PROPERTIES LANGUAGE CXX )
|
||||||
|
|
||||||
set(SOURCE_FILES
|
set(SOURCE_FILES
|
||||||
lib/aes.c
|
lib/aes.c
|
||||||
@ -13,5 +14,6 @@ set(SOURCE_FILES
|
|||||||
network.cpp
|
network.cpp
|
||||||
)
|
)
|
||||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -static")
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -static")
|
||||||
set(CMAKE_LINK_LIBRARY_FLAG "-lrt")
|
#set(CMAKE_LINK_LIBRARY_FLAG "-lrt")
|
||||||
add_executable(udp2raw_tunnel ${SOURCE_FILES})
|
add_executable(udp2raw_tunnel ${SOURCE_FILES})
|
||||||
|
target_link_libraries(udp2raw_tunnel rt)
|
||||||
|
2
common.h
2
common.h
@ -71,7 +71,7 @@ const u32_t client_retry_interval=1000;
|
|||||||
const u32_t server_handshake_timeout=10000;// this should be much longer than clients. client retry initially ,server retry passtively
|
const u32_t server_handshake_timeout=10000;// this should be much longer than clients. client retry initially ,server retry passtively
|
||||||
|
|
||||||
const int conv_clear_ratio=10; //conv grabage collecter check 1/10 of all conv one time
|
const int conv_clear_ratio=10; //conv grabage collecter check 1/10 of all conv one time
|
||||||
const int conn_clear_ratio=10;
|
const int conn_clear_ratio=30;
|
||||||
const int conv_clear_min=5;
|
const int conv_clear_min=5;
|
||||||
const int conn_clear_min=1;
|
const int conn_clear_min=1;
|
||||||
|
|
||||||
|
2
makefile
2
makefile
@ -4,7 +4,7 @@ FLAGS2= -O3
|
|||||||
all:
|
all:
|
||||||
sudo killall udp2raw||true
|
sudo killall udp2raw||true
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
g++ main.cpp -o udp2raw -static -ggdb -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -lrt -std=c++11 ${FLAGS} ${FLAGS2}
|
gcc main.cpp -o udp2raw -static -ggdb -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -lrt -std=c++11 ${FLAGS} ${FLAGS2}
|
||||||
# ${ccmips} main.cpp -o udp2raw_ar71xx -lrt -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -std=c++11 ${FLAGS} ${FLAGS2}
|
# ${ccmips} main.cpp -o udp2raw_ar71xx -lrt -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -std=c++11 ${FLAGS} ${FLAGS2}
|
||||||
fast:
|
fast:
|
||||||
sudo killall udp2raw||true
|
sudo killall udp2raw||true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user