1.1 --- a/docs/wiki/L4Re_Support Sat May 23 19:39:42 2020 +0200
1.2 +++ b/docs/wiki/L4Re_Support Sun Jul 05 01:09:20 2020 +0200
1.3 @@ -95,23 +95,39 @@
1.4 SERVER_INTERFACES_CC = dataspace dataspace_factory
1.5 }}}
1.6
1.7 -After these definitions, it is possible to provide the normal source file
1.8 -definitions which will be augmented by source files generated to support the
1.9 -interfaces.
1.10 +These interface definitions are then complemented with definitions that expand
1.11 +to the source files involved. For example:
1.12 +
1.13 +{{{
1.14 +CLIENT_INTERFACES_SRC_C = $(call interfaces_to_client_c,$(CLIENT_INTERFACES_C))
1.15 +}}}
1.16 +
1.17 +Or:
1.18 +
1.19 +{{{
1.20 +SERVER_INTERFACES_SRC_CC = $(call interfaces_to_server_cc,$(SERVER_INTERFACES_CC))
1.21 +}}}
1.22 +
1.23 +After these definitions, it is convenient to provide the plain source files
1.24 +that are present in the package. For example:
1.25 +
1.26 +{{{
1.27 +PLAIN_SRC_C = routines.c main.c
1.28 +}}}
1.29 +
1.30 +With this, it is possible to provide the normal source file definitions which
1.31 +will be a combination of the plain source files with the ones providing
1.32 +support for interfaces.
1.33
1.34 For example, for a client program employing generated C language files:
1.35
1.36 {{{
1.37 -SRC_C = $(call interfaces_to_client_c,$(CLIENT_INTERFACES_C)) \
1.38 - routines.c main.c
1.39 +SRC_C = $(PLAIN_SRC_C) $(CLIENT_INTERFACES_SRC_C)
1.40 }}}
1.41
1.42 -It is recommended that the "call" generating the interface source files be
1.43 -placed before the other files. This should cause any required headers to be
1.44 -generated first.
1.45 -
1.46 -(It may be the case that more sophisticated dependency handling may remove the
1.47 -above restriction and actually be necessary, too.)
1.48 +To make sure that any required headers are generated before attempts are made
1.49 +to compile the source files, a special rule is required at the end of the
1.50 +file. This is mentioned below.
1.51
1.52 Library-related and header-related definitions are typically needed. For
1.53 example:
1.54 @@ -137,6 +153,20 @@
1.55
1.56 This must appear after the role-specific inclusion statement.
1.57
1.58 +Finally, to coordinate the generation of header files with compilation, a rule
1.59 +must be added after the L4Re build system `include` statements. This must make
1.60 +the plain source files dependent on generated files. For example:
1.61 +
1.62 +{{{
1.63 +$(PLAIN_SRC_C): $(CLIENT_INTERFACES_SRC_C)
1.64 +}}}
1.65 +
1.66 +Or, for C++ server code, using the above naming conventions:
1.67 +
1.68 +{{{
1.69 +$(PLAIN_SRC_CC): $(SERVER_INTERFACES_SRC_CC)
1.70 +}}}
1.71 +
1.72 The following sections describe the different elements of this basic
1.73 arrangement in more detail.
1.74