Cleanup
[splendini.git] / build.linux
blobff1f4feca7a688e49cb1f601ffec94b11bc305ec
2 Libraries you'd need:
3 ---------------------
4 gc:             http://www.hpl.hp.com/personal/Hans_Boehm/gc/
5 gmp:    http://gmplib.org/
6 mpfr:   http://www.mpfr.org/mpfr-current/mpfr.html
8 optional:
9 rlwrap (un*x)
12 Building:
13 ---------
14 make and change into a directory and get the code: 
16 mkdir spl; cd spl;
17 git clone ssh://repo.or.cz/srv/git/splendini.git
19 make and change into second directory (where the code is build)
21 cd ..; mkdir splBuild; cd splBuild;
22 cmake -DCMAKE_BUILD_TYPE=Debug ../splendini/
23 make 
25 (other options for the build type: Release, RelWithDebInfo) 
27 that will build the splendiniCore executable.
29 If a library is in a non standard place use:
30 export C_INCLUDE_PATH=/path/to/local/include
31 export CMAKE_PREFIX_PATH=/path/to/local/lib64/
33 On Linux and Mac you can use the script ./splendini which will run splendini via rlwrap and give command line history, editing and completion.
36 Cross compile for windows:
37 --------------------------
39 compile gmp and gc as static libraries
40 (./configure --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 --disable-shared)
42 cmake -DCMAKE_TOOLCHAIN_FILE=./Toolchain-cross-mingw32-linux.cmake ../splend    ini
44 ------> Toolchain-cross-mingw32-linux.cmake <-----------
45 # the name of the target operating system
46 SET(CMAKE_SYSTEM_NAME Windows)
48 # Choose an appropriate compiler prefix
50 # for classical mingw32
51 # see http://www.mingw.org/
52 #set(COMPILER_PREFIX "i586-mingw32msvc")
54 # for 32 or 64 bits mingw-w64
55 # see http://mingw-w64.sourceforge.net/
56 #set(COMPILER_PREFIX "i686-w64-mingw32")
57 set(COMPILER_PREFIX "x86_64-w64-mingw32")
59 # which compilers to use for C and C++
60 find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
61 #SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
62 find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
63 #SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
64 find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
65 #SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
68 # here is the target environment located
69 SET(USER_ROOT_PATH /home/erk/erk-win32-dev)
70 SET(CMAKE_FIND_ROOT_PATH  /usr/${COMPILER_PREFIX} ${USER_ROOT_PATH})
72 # adjust the default behavior of the FIND_XXX() commands:
73 # search headers and libraries in the target environment, search 
74 # programs in the host environment
75 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
76 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
77 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
79 --------------------------------------------------------