Changes between Initial Version and Version 1 of Using Aesop in other projects


Ignore:
Timestamp:
03/30/12 15:43:30 (10 years ago)
Author:
carns
Comment:

describe how to use aecc outside of the aesop tree

Legend:

Unmodified
Added
Removed
Modified
  • Using Aesop in other projects

    v1 v1  
     1The source translator/compiler for aesop is called aecc.  Once you run "make install" in the aesop build tree you will be able to find aecc in <prefix>/bin/aecc.  The default operating mode of aecc is to translate a .ae file into a .o file (similar to using gcc to translate a .c file into a .o file).  The best way to illustrate this is with an example.  In this case we will copy a test program from the aesop source tree to an external directory, and then compile, link, and run the test program: 
     2 
     3{{{ 
     4mkdir aesop-test 
     5cp <aesop_src_dir>/src/aefile/test/aefile-example.ae aesop-test 
     6cd aesop-test 
     7<aesop_prefix>/bin/aecc -o aefile-example.o aefile-example.ae 
     8$CC -L<aesop_prefix/lib aefile-example.o -o aefile-example -laesop -lc-utils -lpthread -lm 
     9./aefile-example 
     10}}} 
     11 
     12Notes: 
     13 * <aesop_src_dir> refers to the Aesop source tree.  In this case we are only using it to provide an example test program. 
     14 * <aesop_prefix> refers to the path that Aesop has been installed to.  This would have been specified with the --prefix argument at configure time 
     15 * aecc automatically sets necessary include paths for Aesop run-time headers 
     16 * If you need to specify additional CFLAGS to aecc, provide them after a -- delimiter.  For example: "aecc -o aefile-example.o aefile-example.ae -- -g -Wall" 
     17 * Linking can be performed with your normal C compiler or linker.  However, you must use the -L argument to specify the path to the installed aesop run-time libraries, and you must explicitly link in libaesop, libc-utils, libpthread, and libm. 
     18 
     19In future work we will improve the aecc translator so that it has more conventional arguments (matching standard C compilers) and can perform the linking step so that aesop users do not have to manually specify all of the libraries.