Compiling and Testing Xlate
These are step-by-step instructions to help you compile and/or test the xlate
executable outside Matlab. These instructions are for UNIX users only.
- Go to folder manuals/make_xlate.
The folder contains the following files:
- xlate.l -- source code for xlate;
- xlate.c -- C-version of the source code;
- makefile -- file containing command lines for the compilation;
- test_input -- a test imitation of a pulse program, to check if the compiled xlate
works properly;
- vs_init_.m, vs_mainsim_.m, vs_guihandles_.m, vs_params_.m -- xlate output files, to be
used as benchmarks for testing xlate.
- Type make to start the compilation. Prior to doing this you might want to check
- if you have a Lex compiler on your computer (and its name is lex), and
- if you have a Unix C-compiler available (and its name is gcc).
-->If the compiler name is different, e.g. cc instead of gcc), you will have to
modify the corresponding lines in your makefile.
-->If you don't have a Lex compiler available, but you do have a C-compiler, you can use the
C-version of the source code, xlate.c, included in the package. To make an executable,
type:
gcc -o xlate xlate.c
-->If you have no C-compiler, you will have to get one or try to get access to a Unix machine
running under the same OS, in order to create an executable.
- Testing xlate: to test whether the compiled Translator is working properly on your machine,
issue the following command under Unix:
xlate test_input
(Note for Windows users: you can perform a similar test by typing the same line after DOS prompt
in the DOS shell).
This will result in the appearance of 4 new files in your make_xlate directory:
vs_init.m, vs_mainsim.m, vs_guihandles.m, vs_params.m . You should now compare the content of
these files with the benchmark files (e.g. vs_mainsim.m with vs_mainsim_.m, etc) -- these files
must be identical.
GO BACK