Back to home page

Enduro/X

 
 

    


0001 BUILDCLIENT(8)
0002 ==============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 buildclient - Build XATMI server executable
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 *clientclient* ['OPTIONS']
0014 
0015 
0016 DESCRIPTION
0017 -----------
0018 Build client is a binary which compiles and links the ATMI client binary executable.
0019 Linkage does occur with Enduro/X UBF, ATMI and ATMI client libraries. The build
0020 Entry point of main() for binary is expected to be present in user sources. 
0021 Either in object files or *.c* passed to compile command. During the compilation,
0022 resource manager XA switch name export symbol is generated and built-in in the
0023 binary. If resource manager/XA switch is not passed to the build command, NULL
0024 switch (*tmnull_switch*) is used. When configuration applications which uses
0025 two phase commit where build-in switch usage is required, then XA group/RM must
0026 be configured with *libndrxxatmsx(8)* driver, which resolves the built in symbol.
0027 
0028 The generated source code which is linked with the binary looks like this:
0029 
0030 --------------------------------------------------------------------------------
0031 
0032 /* Buildclient auto-generated code */
0033 /*---------------------------Includes-----------------------------------*/
0034 #include <atmi.h>
0035 #include <xa.h>
0036 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
0037 #define NDRX_API_EXPORT __declspec(dllexport)
0038 #else
0039 #define NDRX_API_EXPORT
0040 #endif
0041 extern struct xa_switch_t ndrxstatsw;
0042 extern struct xa_switch_t * ndrx_xa_builtin_get(void);
0043 expublic NDRX_API_EXPORT struct xa_switch_t *ndrx_G_p_xaswitch = &ndrxstatsw;
0044 struct xa_switch_t * ndrx_switch_pull(void)
0045 {
0046     return ndrx_xa_builtin_get();
0047 }
0048 
0049 --------------------------------------------------------------------------------
0050 
0051 The command line template, how C compiler is invoked, is following:
0052 
0053 --------------------------------------------------------------------------------
0054 <CC> [$CFLAGS] -o <binary_name> <generated_source>.c [-I<$NDRX_HOME>/include 
0055 -L<NDRX_HOME>/{lib|lib64}] [<first_files>] [<RM_libs>] -latmicltbld -latmi -lubf -lnstd [<last_files>]
0056 --------------------------------------------------------------------------------
0057 
0058 All filesystem path related buffers internally are set to 5120 bytes + EOS byte,
0059 thus for example if build command is longer than 5120, it will be truncated
0060 to 5120.
0061 
0062 ENVIRONMENT
0063 -----------
0064 [*CC*]::
0065 Optional environment variable indicating which C compiler to use. If parameter is
0066 not set, the *cc* command is used.
0067 
0068 [*CFLAGS*]::
0069 Optional C flags to be passed to C compiler during the *cc* execution. There
0070 is set of compiler flags that are required for certain platforms and compilers. 
0071 see "PLATFORM SPECIFIC COMPILER FLAGS" section in *buildserver(8)* program
0072 manpage for these requirements.
0073 
0074 [*NDRX_HOME*]::
0075 Optional environment variable indicating the Enduro/X installation home. If variable
0076 is set then, "-I$NDRX_HOME/include" and "-L$NDRX_HOME/lib" (or lib64) is added 
0077 to the *cc* command line.
0078 
0079 OPTIONS
0080 -------
0081 
0082 [*-C*]::
0083 COBOL mode. Reserved for future use.
0084 
0085 [*-o* filename]::
0086 Output file name for compiler. If not specified, then default is *SERVER*.
0087 
0088 [*-f* firstfiles]::
0089 Arguments to be passed to compiler command line. Typically here source file names, object
0090 file names or library settings are passed. These names are included in compilation command
0091 before Enduro/X libraries (from left to right).
0092 
0093 [*-a*]::
0094 Alias to '-f'.
0095 
0096 [*-l* lastfiles]::
0097 Arguments to be passed to compiler command line. Typically here source file names, object
0098 file names or library settings are passed. These names are included in compilation command
0099 after Enduro/X libraries (from left to right).
0100 
0101 [*-r* rm_name]::
0102 This is resource manager name. The resource manager according the specified name
0103 shall be configured in *$NDRX_RMFILE* (first priority) or *$NDRX_HOME/udataobj/RM* file.
0104 The file format is following 'rm_name:xa_switch_name:<compiler libraries>'. If 
0105 specified, then 'xa_switch_name' is included in the process. Thus later *libndrxxatmsx(8)*
0106 XA driver can be used (set in *NDRX_XA_DRIVERLIB* env var, see *ex_env(5)*), 
0107 so that driver resolves built in symbols. Compiler libraries from resource manager 
0108 are passed in command line after the first files. If switch name is not specified,
0109 then default null switch 'tmnull_switch' is reference (present in *libatmi*).
0110 Full format example can be seen in *buildserver(8)* manpage.
0111 
0112 [*-k*]::
0113 Keep the the generate source code with the main function. If not set, the file
0114 is deleted when *buildserver* finishes.
0115 
0116 [*-t*]::
0117 Server is multi-threaded. Indicates that server can be started/configured in
0118 multi-threaded mode. This flag is reserved for future use. Currently this
0119 indication is built in the binary, but not used in any other way. Will be used
0120 once Enduro/X will support multi-threaded service dispatching. Do not confuse
0121 this flag with current Enduro/X threading model, as user threads are fully
0122 supported.
0123 
0124 [*-v*]::
0125 Verbose mode. This will print the build command to stderr.
0126 
0127 [*-h*]::
0128 Print the help.
0129 
0130 
0131 EXAMPLE
0132 -------
0133 See *atmitest/test071_buildtools/run.sh* for samples. Some of them:
0134 
0135 --------------------------------------------------------------------------------
0136 $ export CC=cc
0137 $ buildclient -o atmiclt71_txn -a atmiclt71_txn.c -v -r TestSw -k \
0138     -f "-I../../include -L../../libatmi -L../../libubf -L../../libnstd -L ../../libatmiclt"
0139 
0140 --------------------------------------------------------------------------------
0141 
0142 That would result in following compilation unit:
0143 
0144 --------------------------------------------------------------------------------
0145 
0146 $ cc  -o atmiclt71_txn ndrx_bc_ANd6SM.c atmiclt71_txn.c -I../../include \
0147     -L../../libatmi -L../../libubf -L../../libnstd -L ../../libatmiclt \
0148     -L ../test021_xafull -l xadrv -latmicltbld -latmi -lubf -lnstd -lrt -ldl -lm -lc -lpthread
0149 
0150 --------------------------------------------------------------------------------
0151 
0152 
0153 EXIT STATUS
0154 -----------
0155 *0*::
0156 Success
0157 
0158 *1*::
0159 Failure
0160 
0161 BUGS
0162 ----
0163 Report bugs to support@mavimax.com
0164 
0165 SEE ALSO
0166 --------
0167 *buildserver(8)* *buildtms(8)* *ex_env(5)*
0168 
0169 COPYING
0170 -------
0171 (C) Mavimax, Ltd
0172