equal
deleted
inserted
replaced
1 #labels Phase-Implementation |
1 #labels Phase-Implementation |
|
2 ==Automatic== |
|
3 |
|
4 Configure with `cmake -DNOPASCAL=1` and then run `make`. |
|
5 |
|
6 ==Manual run== |
|
7 |
2 Run from the `tools` folder |
8 Run from the `tools` folder |
3 {{{ |
9 {{{ |
4 ghc -e "pas2C \"hwengine\"" pas2c.hs |
10 ghc -e pas2C \"hwengine\"" pas2c.hs |
5 }}} |
11 }}} |
6 |
12 |
7 You can replace "hwengine" with any other module. |
13 You can replace "hwengine" with any other module. |
8 |
14 |
9 Every pas file will be converted to a .c/.h version in the `hedgewars` folder. In case no output is produced something has gone wrong. |
15 Every pas file will be converted to a .c/.h version in the `hedgewars` folder. In case no output is produced something has gone wrong. |
10 |
16 |
11 Use `clang` to compile, `gcc` compatibility is not yet achieved. We are curious to hear about `icc` and `msvc`. |
17 Use `clang` to compile, `gcc` compatibility is not yet achieved. We are curious to hear about `icc` and `msvc` (not that we expect anything...) |
|
18 |
|
19 ==Development== |
|
20 There are some special file that you need to know |
|
21 |
|
22 * project_files/hwc/rtl/fpcrtl.h - contains definitions of external functions defined inside custom pascal units (eg SDLh.pas); |
|
23 * hedgewars/pas2cSystem.pas - contains definitions of external functions defined outside our own pascal units (eg png and gl units, bundled with freepascal); |
|
24 * hedgewars/pas2cRedo.pas - contains definitions of internal fpc units (provided by the 'rtl') which get a fpcrtl_ prefix. |
|
25 |
|
26 If you need to hide portions of code from pas2c just wrap it with `${IFNDEF PAS2C}...{$ENDIF}` |