7 | | Compilers |
| 7 | = Howto (cross-)compile = |
| 8 | += How To: (Cross-) compiling = |
| 9 | |
| 10 | '''i686''' or '''x86_64''': |
| 11 | {{{ |
| 12 | just do 'make' |
| 13 | All about [wiki:crosscompiling (Cross-) compiling and Toolchains]. |
| 14 | |
| 15 | Binary output will be located in oscam-svn/Distribution |
| 16 | }}} |
| 17 | [[BR]] |
| 18 | |
| 19 | '''fritzbox / dd-wrt Router / Dreambox ''':[[BR]] |
| 20 | |
| 21 | __''Step 1''__:[[BR]] |
| 22 | Before you can start to compile OSCAM for any Platform, you need to get the right Toolchain. They will be provided in Q1/2010 |
| 23 | |
| 24 | __''Step 2''__:[[BR]] |
| 25 | Install cmake. The best thing is to compile cmake for your platform. RPM install didn't work for me. |
| 26 | |
| 27 | cmake version 2.6-patch 4 works for OSCAM. |
| 28 | |
| 29 | __''Step 3''__: [[BR]] |
| 30 | Download Source Repository |
| 31 | |
| 32 | __''Step 4''__: [[BR]] |
| 33 | Create a build directory in oscam-svn |
| 34 | |
| 35 | {{{ |
| 36 | cd oscam-svn |
| 37 | mkdir build_dir |
| 38 | cd build_dir |
| 39 | }}} |
| 40 | |
| 41 | __''Step 5''__ [[BR]] |
| 42 | Create a Shell Script in the directory build_dir |
| 43 | |
| 44 | vi install.sh |
| 45 | {{{ |
| 46 | #!/bin/sh |
| 47 | export MYPATH=$PATH |
| 48 | export PATH=/toolchain/ANYPLATFORM/bin:$MYPATH |
| 49 | |
| 50 | cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/toolchain-ANYPLATFORM.cmake .. |
| 51 | make |
| 52 | }}} |
| 53 | |
| 54 | chmod 755 install.sh |
| 55 | |
| 56 | Remember to set the Toolchain Path correctly. Also take a look inside the Toolchain cmake Script. You have to add the right Compiler for your platform. |
| 57 | |
| 58 | __''Step 6''__ [[BR]] |
| 59 | Execute the Shell Script |
| 60 | |
| 61 | ./install.sh |
| 62 | |
| 63 | The Output will be located in the build_dir |