We start with writing a corresponding IDL file. Therefore, switch into $(PKGDIR)/idl/ and create the file hiworld.idl:
hiworld/idl/hiworld.idl |
interface hi { void print(void); int count(void); }; |
Modify the prepared makefile to assign the IDL file to the variable IDL, and to ask the IDL compiler to generate server skeletons. The skeletons will help us later to insert our code:
hiworld/idl/Makefile |
... IDL = hiworld.idl IDL_FLAGS = -t ... |
Generate the C sources by calling make:
~/src/l4/pkg/hiworld/idl> make O=/path/to/build
If your IDL compiler was installed correctly, you end up with the directory OBJ-x86_586-l4v2 in the build directory containing the C sources for IPC communication between client and server. For details on the IDL file syntax, the meaning of the command line switches or the generated source code, please see the documentation of the IDL compiler dice, which you can build yourself in $(L4DIR)/tool/dice/doc/ or find it in [4].