From 8c34abe3caab591894f2ebc71492319533d9adac Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Thu, 28 Jan 2021 22:52:11 +0100 Subject: [PATCH] update README --- README.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4287387..1bc3c94 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ libprof's measurements are accurate down to the microsecond-level thanks to precise hardware timers, so it can also be used to time even small portions of code. -## Installing with GiteaPC +## Installing and using libprof in a program + +**Installing with GiteaPC** libprof can be built and installed with [GiteaPC](https://gitea.planet-casio.com/Lephenixnoir/GiteaPC), an automation tool for the fxSDK. @@ -16,9 +18,7 @@ libprof can be built and installed with [GiteaPC](https://gitea.planet-casio.com % giteapc install Lephenixnoir/libprof ``` -Link with `-lprof-fx` on fx-9860G and `-lprof-cg` on fx-CG 50. - -## Building and installing manually +**Installing manually** libprof should be built with the [fxSDK](/Lephenixnoir/fxsdk), which provides compiler settings and library interfaces to build on the calculator. @@ -31,6 +31,24 @@ with a suitable toolchain file while exposing CMake modules for the calculator. % fxsdk build-cg install ``` +**Using in a CMake-based add-in** + +Find the `LibProf` package, which has a `LibProf` target. Versions are numbered like gint, so aim for your version of gint. + +```cmake +find_package(LibProf 2.1 REQUIRED) +target_link_libraries( LibProf::LibProf) +``` + +**Using in a Makefile-based add-in** + +Link with `-lprof-fx` on fx-9860G and `-lprof-cg` on fx-CG 50. In `project.cfg`: + +```makefile +LIBS_FX := -lprof-fx +LIBS_CG := -lprof-cg +``` + ## Basic use To access the library, include the `` header file and call