This section assumes that you have built a chorus or kernonly system image in the build_dir directory. This example will create a simple Hello World actor.
Create a working directory where the actor will reside.
In this working directory, create a file named Imakefile containing the following lines:
Depend(hello.c) EmbeddedSupActorTarget(hello_s.r,hello.o,)
Create a file named hello.c containing your Hello World program, written in C. For example:
#include <stdio.h>
int main()
{
printf("Hello World!\n");
return(0);
}
Generate a Makefile to build the actor, by typing the following command:
% ChorusOSMkMf build_dir/Paths |
See ChorusOSMkMf(1CC) for more information about creating a Makefile.
Build the dependencies:
% make depend |
Build the application:
% make |
Your directory will now contain a supervisor actor, hello_s.r.