Lines Matching +full:build +full:- +full:static +full:- +full:rel
4 @brief How to build the library and test programs and include the library in an application
7 ----------------
9 The current makefiles and build projects support building the library on:
10 - Linux and Windows, x86 or x64 hosts.
11 - ARM linux - AArch32 and AArch64
12 - ARM aarch32 and aarch64 libs, x-compiled on x86/64 hosts.
13 - MacOS - x64 and AArch64 (Apple Silicon)
19 --------------------
21 The library and test programs are built from the library `./build/<platform>` directory, where
22 <platform> is either 'linux', 'macos', or 'win-vs2022'
32 libraries in `decoder/lib/<tgt_dir>`, and also as a sub-directory of the build process for
33 intermediate files - `decoder/build/linux/ref_trace_decode_lib/<tgt_dir>`.
35 For a standard build, go to the `./build/linux/` and run `make` in that directory.
37 This will set <tgt_dir> to `builddir` for all build variants of the library. Using this only one va…
39 For development, alternatively use `make -f makefile.dev`
41 This will set <tgt_dir> to `linux<bit-variant>/<dbg|rel>` and therefore build libraries into the
42 `decoder/lib/linux<bit-variant>/<dbg|rel>` directories, allowing multiple variants of the library
47 `./lib/linux64/rel` will contain the linux 64 bit release libraries.
49 `./lib/linux-arm64/dbg` will contain the linux aarch 64 debug libraries for ARM.
51 Options to pass to both makefiles are:-
52 - `DEBUG=1` : build the debug version of the library.
54 Options to pass to makefile.dev are:-
55 - ARCH=<arch> : sets the bit variant in the delivery directories. Set if cross compilation for ARCH
56 other than host. Otherwise ARCH is auto-detected.
60 compiler to use. The following would set the environment to cross-compile for ARM
62 export PATH=$PATH:~/work/gcc-x-aarch64-6.2/bin
64 export CROSS_COMPILE=aarch64-linux-gnu-
70 - `libcstraced.so.M.m.p` : shared library containing the main C++ based decoder library
71 - `libcstrace.so.M` : symbolic link name to library - major version only.
72 - `libcstrace.so` : symbolic link name to library - no version.
75 - `libcstraced_c_api.so.M.m.p` : shared library containing the C-API wrapper library. Dependent on …
76 - `libcstraced_c_api.so.M` : symbolic link name to library - major version only.
77 - `libcstraced_c_api.so` : symbolic link name to library - no version.
79 Static versions of the libraries:
80 - `libcstraced.a` : static library containing the main C++ based decoder library.
81 - `libcstraced_c_api.a` : static library containing the C-API wrapper library.
86 - `trc_pkt_lister` - dependent on `libcstraced.so`.
87 - `simple_pkt_print_c_api` - dependent on `libcstraced_c_api.so` & hence `libcstraced.so`.
89 The test program build for `trc_pkt_lister` also builds an auxiliary library used by this program f…
92 **Note on Linux Build Directory Names**
96 …g out the project into a directory such as ` /home/name/my opencsd/` will result in build failures.
102 e.g. ` make -f makefile.dev DEBUG=1 install`
108 Sufficient header files to build using the C-API library will be installed to `/usr/include/opencsd…
117 Go to the `./decoder/build/macos/` directory and run `make`.
119 Output libraries will be placed in the same folders as for the Linux build (`decoder/lib/builddir/`
125 DYLD_LIBRARY_PATH=./decoder/lib/builddir ./decoder/tests/bin/builddir/trc_pkt_lister -h
127 For development, alternatively use `make -f makefile.dev`
129 …milar to the Linux makefile.dev, this will build libraries into the `decoder/lib/darwin<bit-varian…
132 Options to pass to both makefiles are:-
133 - `DEBUG=1` : build the debug version of the library.
135 Options to pass to makefile.dev are:-
136 - ARCH=<arch> : Set this if needing to build for x86_64 from an arm64 host, or to build for arm64 f…
137 Otherwise ARCH is auto-detected.
143 Use the `.\build\win\ref_trace_decode_lib\ref_trace_decode_lib.sln` file to load a solution
144 which contains all library and test build projects.
146 Libraries are delivered to the `./lib/win<bitsize>/<dbg\rel>` directories.
147 e.g. `./lib/win64/rel` will contain the windows 64 bit release libraries.
149 The solution contains four configurations:-
150 - *Debug* : builds debug versions of static C++ main library and C-API libraries, test programs lin…
151 - *Debug-dll* : builds debug versions of static main library and C-API DLL. C-API statically linked…
152 C-API test built as `c_api_pkt_print_test_dll.exe` and linked against the DLL version of the C-API …
153 - *Release* : builds release static library versions, test programs linked to static libraries.
154 - *Release-dll* : builds release C-API DLL, static main library.
159 Libraries built are:-
160 - `libopencsd.lib` : static main C++ decoder library.
161 - `libopencsd_c_api.lib` : C-API static library.
162 - `libopencsd_c_api.dll` : C-API DLL library. Statically linked against `libcstraced.lib` at .DLL b…
165 There is also a project file to build an auxiliary library used `trc_pkt_lister` for test purposes …
166 This is the `snapshot_parser_lib.lib` library, delivered to the `./tests/lib/win<bitsize>/<dgb\rel>…
169 ### Additional Build Options ###
177 32 bit ARM architectures it may be desirable to build a library that uses a v-addr size of
182 ---------------------------------------
184 The user source code includes a header according to the API to be used:-
186 - Main C++ decoder library - include `opencsd.h`. Link to C++ library.
187 - C-API library - include `opencsd_c_api.h`. Link to C-API library.
189 ### Linux build ###
191 By default linux builds will link against the .so versions of the library. Using the C-API library …
195 To use the static versions use appropriate linker options.
197 ### MacOS build ###
199 The same applies as for the Linux build w.r.t the .dylib versions of the library.
201 ### Windows build ###
203 To link against the C-API DLL, include the .DLL name as a dependency in the application project opt…
205 To link against the C-API static library, include the library name in the dependency list, and defi…
206 `OCSD_USE_STATIC_C_API` in the preprocessor definitions. This ensures that the correct static bindi…
213 ---------------------------
229 - `OPENCSD_MEMACC_CACHE_PAGE_SIZE` : Page size in bytes.
230 - `OPENCSD_MEMACC_CACHE_PAGE_NUM` : number of pages.
231 - `OPENCSD_MEMACC_CACHE_OFF` : disable memacc caching.
235 ---------------------
249 …define any opcode with the top 16 bits as 0x0000 as an invalid opcode range - which is the range d…