yp-client Build Environment
The proper libraries and tools must be installed before a yp-client application can be built.
Setup yp-client Directory
The sample applications directory 'yp-client' should be copied to a writable location, such as the $HOME directory.
> cp -R /usr/share/yumapro/src/yp-client $HOME/
app-rules.make
There is a make rules file called 'app-rules.make' that is
used by each sample application. This file should not
be modified. The project make file casn set the SUBDIR_NM
variable to add make flags.
The sget-system directory Makefile is shown as an example:
# Makefile for sget-system C++ example
#
# yp-client/sget-system directory
#
############### SOURCE PROFILE ##############################
PROJECT_NM=yumapro
SUBDIR_NM=yp-client
SUBDIR_CPP=
SOURCE=sget-system.cpp
PROG=sget-system
include ../app-rules.make
Make Flags
The correct make flags must be used to compile yp-client applications. The 'SUBDIR_CPP' variable can be used to set make flags for the project. Some make flags can also be entered at the command line.
The
PTHREADS=1
flag must not be used since it is handled in 'app-ruls.make'.If the YumaPro library dependencies are installed from source code, then the same CFLAGS should be used for both.
If the YumaPro library dependencies are installed from a binary package (e.g.,
yumapro-pthreads
) then the feature make flags should match the following values:
21.10 and 22.10 Release Trains
SUBDIR_CPP += -DWITH_CALLHOME=1 -DWITH_CLI=1 -DWITH_CURL=1 -DWITH_OPENSSL=1 -DWITH_RESTCONF=1
SUBDIR_CPP += -DWITH_SUPPORT_SAVE=1 -DWITH_TEMPLATES=1 -DWITH_YANGMAP=1 -DWITH_YCONTROL=1
SUBDIR_CPP += -DWITH_YP_HA=1 -DWITH_YANG_PUSH=1
22.10T Release Train
SUBDIR_CPP += -DWITH_CALLHOME=1 -DWITH_CLI=1 -DWITH_CURL=1 -DWITH_OPENSSL=1 -DWITH_RESTCONF=1
SUBDIR_CPP += -DWITH_SUPPORT_SAVE=1 -DWITH_TEMPLATES=1 -DWITH_YANGMAP=1 -DWITH_YCONTROL=1
SUBDIR_CPP += -DWITH_YP_HA=1 -DWITH_YANG_PUSH=1 -DWITH_SCHEMA_MOUNT=1 -DWITH_YANG_CBOR=1
DEBUG=1
The make flag DEBUG=1
must be used in a debugger such as 'gdb' is used.
This flag should be added from the command line.
Setup External Libraries
The Package Pre-requisites section describes the packages needed by client applications. The packages should be installed correctly so the yp-client binary application will be linked properly. The actual libraries needed depends on the make flags used in the
The YumaPro Shared Libraries section of the Installation Manual describes all of the shared libraries that are installed for YumaPro SDK programs. Not all libraries need to be present, depending on the make flags used to build the YumaPro libraries. Typically, the following YumaPro libraries are required:
libyumapro_ncx.so
libyumapro_mgr.so
libyumapro_subsys-pro.so
libyumapro_ycli.so