瀏覽代碼

Updated toolchain README with tips on include dirs

Taddeus Kroes 11 年之前
父節點
當前提交
038b0940f6
共有 1 個文件被更改,包括 19 次插入3 次删除
  1. 19 3
      bin/README

+ 19 - 3
bin/README

@@ -11,12 +11,28 @@ There are three binaries in the toolchain:
 - The virtual machine "civvm", which runs one or more object files, one of
   which should export a "main" function.
 
-Additionally, there is a run script "run.sh" which takes one file name argument
+Additionally, there is a run script "civrun" which takes one file name argument
 and runs it through the entire pipeline, deleting intermediate files
 afterwards. E.g. for the first assignment you may want to run:
-$ bin/run.sh euclid.cvc
-<output of your main function>
+$ bin/civrun euclid.cvc
+Please enter an integer value: 60
+Please enter an integer value: 45
+15
 
+Or even:
+$ echo 60 45 | bin/civrun euclid.cvc 2>&1
+15
+
+The toolchain also contains the file "civic.h" which defines the CiviC standard
+library supported by the VM. It is practical to keep this in the same directory
+as the reference compiler binary, because the compiler adds the folder in which
+it resides in to the include directories of the C preprocessor (along with the
+current working directory).
+
+You may want to add the toolchain directory to your $PATH so you can run the
+tools without having to prefix "<...>/bin/" every time when using the
+toolchain. E.g. add to your ~/.bashrc:
+export PATH=$PATH:<directory_where_you_unpacked_the_toolchain>/bin
 
 Reference compiler usage
 ========================