Updated with all the new stuff
authorvittorio.giovara@gmail.com
Wed, 19 Jun 2013 08:14:30 +0000
changeset 330 74f23d3af091
parent 329 21830c0b19f3
child 331 8a16017f175f
Updated with all the new stuff
pas2CTutorial.wiki
--- a/pas2CTutorial.wiki	Wed Jun 19 00:44:18 2013 +0000
+++ b/pas2CTutorial.wiki	Wed Jun 19 08:14:30 2013 +0000
@@ -1,11 +1,26 @@
 #labels Phase-Implementation
+==Automatic==
+
+Configure with `cmake -DNOPASCAL=1` and then run `make`.
+
+==Manual run==
+
 Run from the `tools` folder
 {{{
-ghc -e "pas2C \"hwengine\"" pas2c.hs
+ghc -e pas2C \"hwengine\"" pas2c.hs
 }}}
 
 You can replace "hwengine" with any other module.
 
 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.
 
-Use `clang` to compile, `gcc` compatibility is not yet achieved. We are curious to hear about `icc` and `msvc`.
\ No newline at end of file
+Use `clang` to compile, `gcc` compatibility is not yet achieved. We are curious to hear about `icc` and `msvc` (not that we expect anything...)
+
+==Development==
+There are some special file that you need to know
+
+  * project_files/hwc/rtl/fpcrtl.h - contains definitions of external functions defined inside custom pascal units (eg SDLh.pas);
+  * hedgewars/pas2cSystem.pas - contains definitions of external functions defined outside our own pascal units (eg png and gl units, bundled with freepascal);
+  * hedgewars/pas2cRedo.pas - contains definitions of internal fpc units (provided by the 'rtl') which get a fpcrtl_ prefix.
+
+If you need to hide portions of code from pas2c just wrap it with `${IFNDEF PAS2C}...{$ENDIF}`
\ No newline at end of file