Skip to content

Commit 5d400d6

Browse files
committed
Merge pull request #13 from Shao-Feng/travis
Enable Travis and CMake for arm ia32 and ia64
2 parents 2e67ec3 + 0e25b82 commit 5d400d6

File tree

8 files changed

+88
-1
lines changed

8 files changed

+88
-1
lines changed

.travis.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
language: cpp
2+
3+
compiler:
4+
- gcc
5+
before_script:
6+
- sudo apt-get update
7+
- sudo apt-get install tree cmake gcc-4.6-arm-linux-gnueabi g++-4.6-arm-linux-gnueabi libc6-dev-i386 lib32stdc++6 g++-multilib g++-4.6-multilib
8+
- mkdir build
9+
- cd build
10+
# build for x86_64
11+
- cmake -Dx86_64=ON ..
12+
- make
13+
- cp ./tinyweb ../dest/x86_64/
14+
- cp ./cgi-getcookie ../dest/x86_64/
15+
- cp ./cgi-getfield ../dest/x86_64/
16+
- rm -rf *
17+
# build for i386
18+
- cmake -Di386=ON ..
19+
- make
20+
- cp ./tinyweb ../dest/i386/
21+
- cp ./cgi-getcookie ../dest/i386/
22+
- cp ./cgi-getfield ../dest/i386/
23+
- rm -rf *
24+
# build for arm
25+
- cmake -D CMAKE_TOOLCHAIN_FILE=../arm_toolchain.cmake ..
26+
- make
27+
- cp ./tinyweb ../dest/arm/
28+
- cp ./cgi-getcookie ../dest/arm/
29+
- cp ./cgi-getfield ../dest/arm/
30+
- rm -rf *
31+
script: tree ../dest/

CMakeLists.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
cmake_minimum_required (VERSION 2.8)
2+
project (tinyweb)
3+
4+
#version number
5+
set (tinyweb_VERSION_MAJOR 1)
6+
set (tinyweb_VERSION_MINOR 0)
7+
8+
#build arch option
9+
option(i386 "i386" OFF)
10+
option(x86_64 "x86_64" OFF)
11+
12+
find_package(Threads REQUIRED)
13+
14+
add_executable(tinyweb websocket.c tinyweb.c mongoose.c)
15+
16+
target_link_libraries(tinyweb "${CMAKE_THREAD_LIBS_INIT}")
17+
target_link_libraries(tinyweb ${CMAKE_DL_LIBS})
18+
19+
add_executable(cgi-getfield cgi-getfield.c)
20+
21+
add_executable(cgi-getcookie cgi-getcookie.c)
22+
23+
24+
IF(i386)
25+
set_target_properties(tinyweb PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
26+
set_target_properties(cgi-getfield PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
27+
set_target_properties(cgi-getcookie PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
28+
ENDIF()
29+
IF(x86_64)
30+
set_target_properties(tinyweb PROPERTIES COMPILE_FLAGS "-m64" LINK_FLAGS "-m64")
31+
set_target_properties(cgi-getfield PROPERTIES COMPILE_FLAGS "-m64" LINK_FLAGS "-m64")
32+
set_target_properties(cgi-getcookie PROPERTIES COMPILE_FLAGS "-m64" LINK_FLAGS "-m64")
33+
ENDIF()

android/src/com/intel/tinywebtestservice/FullscreenActivity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ public void run() {
156156
}
157157
};
158158
t.start();
159-
t.wait(2000);
159+
synchronized(t){
160+
t.wait(2000);
161+
}
162+
160163
/* String line = "", res = "";
161164
162165
InputStream input = p.getInputStream();

arm_toolchain.cmake

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# CMake toolchain file for building ARM software on OI environment
2+
3+
# this one is important
4+
SET(CMAKE_SYSTEM_NAME Linux)
5+
#this one not so much
6+
SET(CMAKE_SYSTEM_VERSION 1)
7+
8+
# specify the cross compiler
9+
SET(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabi-gcc-4.6)
10+
SET(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabi-g++-4.6)
11+
SET(CMAKE_STRIP /usr/bin/arm-linux-gnueabi-strip)
12+
13+
# where is the target environment
14+
SET(CMAKE_FIND_ROOT_PATH /usr/arm-linux-gnueabi)
15+
16+
# search for programs in the build host directories
17+
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
18+
# for libraries and headers in the target directories
19+
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
20+
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

dest/android/android_dest

Whitespace-only changes.

dest/arm/arm_dest

Whitespace-only changes.

dest/i386/i386_dest

Whitespace-only changes.

dest/x86_64/x86_64_dest

Whitespace-only changes.

0 commit comments

Comments
 (0)