From e9a96abb584c4a99ab82060d6a49299d229030fd Mon Sep 17 00:00:00 2001 From: diamant3 Date: Tue, 10 Oct 2023 17:03:08 +0800 Subject: [PATCH 01/10] update build guide with cmake --- README.md | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eb20ad77..12c30b7d 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,40 @@ libamtrack comes with a collection of wrappers for Python and Matlab (/distribut ## iv. Use precompiled binaries If you want to use libamtrack in your own code, please try to use the precompiled binaries (incl. headers) for your OS (Win, Mac OS X) are found on libamtrack's website. In case you are running Linux (or some exotic OS) you will have to compile and install libamtrack using autotools. But in the future, rpm/deb packages will be provided. -## v. Compile libamtrack from distributed sources -Download the latest source distribution and use autotools (Windows: MinGW, Mac OS X: XCode) to compile and install. - ## vi. Work with full sources / development -This should be the very last alternative - THE FACT THAT YOU ARE LOOKING AT THIS FILE MIGHT BE AN INDICATION THAT YOU WANT TO DEVELOPE RATHER THAN JUST USE libamtrack. If not, try (i)-(vi). IF YOU DO, please look at README_DEVELOPERS. + +If you want to get the latest source code, please use this to build and install. + +Requirements: +- git +- gcc +- libtool +- gfortran +- libgsl-dev +- cmake + +Get the latest source code of the libamtrack: + +```bash +git clone https://github.com/libamtrack/library.git +``` + +Go to `library` directory and then create `build` directory: + +```bash +cd library && mkdir build +``` + +Build the libamtrack: +```bash +cmake -S . -B build +cmake --build build +``` + +Install the libamtrack: +```bash +cmake --install build +``` # 3. CAN I USE LIBAMTRACK IN MY RESEARCH AND/OR MODIFY THE CODE? From 75600a7f9dbb1e5db619802c6ef7cb3f074e210c Mon Sep 17 00:00:00 2001 From: diamant3 Date: Tue, 10 Oct 2023 20:57:08 +0800 Subject: [PATCH 02/10] update build guide based on OS --- README.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12c30b7d..4cc7ef9c 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ If you want to use libamtrack in your own code, please try to use the precompile ## vi. Work with full sources / development -If you want to get the latest source code, please use this to build and install. +If you want to compile it on your own latest source code of libamtrack, please use this to build and install according to your OS. + +### Linux Requirements: - git @@ -62,6 +64,72 @@ Install the libamtrack: cmake --install build ``` +### Windows(MSYS2) + +Get first the [MSYS2](https://www.msys2.org/) and please follow the installation guide. + +Requirements: +- git +- gcc +- libtool +- mingw-w64-x86_64-gcc-libgfortran +- mingw-w64-x86_64-gsl +- cmake + +Get the latest source code of the libamtrack: + +```bash +git clone https://github.com/libamtrack/library.git +``` + +Go to `library` directory and then create `build` directory: + +```bash +cd library && mkdir build +``` + +Build the libamtrack: +```bash +cmake -S . -B build +cmake --build build +``` + +Install the libamtrack: +```bash +cmake --install build +``` +### MacOS + +Get first the [Homebrew](https://brew.sh/) to install the required packages. + +Requirements: +- git +- gcc +- libtool +- gsl +- cmake + +Get the latest source code of the libamtrack: + +```bash +git clone https://github.com/libamtrack/library.git +``` + +Go to `library` directory and then create `build` directory: + +```bash +cd library && mkdir build +``` + +Build the libamtrack: +```bash +cmake -S . -B build +cmake --build build +``` + +Install the libamtrack: +```bash +cmake --install build # 3. CAN I USE LIBAMTRACK IN MY RESEARCH AND/OR MODIFY THE CODE? From 956c13e7db6be3d40a4548255875e35c51466bae Mon Sep 17 00:00:00 2001 From: Diamond Rivero Date: Tue, 10 Oct 2023 21:05:16 +0800 Subject: [PATCH 03/10] Separate build and build files generation Co-authored-by: Leszek Grzanka --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 4cc7ef9c..1dfa321c 100644 --- a/README.md +++ b/README.md @@ -53,11 +53,9 @@ Go to `library` directory and then create `build` directory: cd library && mkdir build ``` -Build the libamtrack: +Generate build files for the libamtrack: ```bash cmake -S . -B build -cmake --build build -``` Install the libamtrack: ```bash From d0f442ad29848a6ec1832d06e2e8d5bbcc4028ca Mon Sep 17 00:00:00 2001 From: diamant3 Date: Tue, 10 Oct 2023 21:09:21 +0800 Subject: [PATCH 04/10] separate build and build files generation --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1dfa321c..e69fc801 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,12 @@ cd library && mkdir build Generate build files for the libamtrack: ```bash cmake -S . -B build +``` + +Build the libamtrack: +```bash +cmake -S . -B build +``` Install the libamtrack: ```bash @@ -86,10 +92,14 @@ Go to `library` directory and then create `build` directory: cd library && mkdir build ``` +Generate build files for the libamtrack: +```bash +cmake -S . -B build +``` + Build the libamtrack: ```bash cmake -S . -B build -cmake --build build ``` Install the libamtrack: @@ -119,10 +129,14 @@ Go to `library` directory and then create `build` directory: cd library && mkdir build ``` +Generate build files for the libamtrack: +```bash +cmake -S . -B build +``` + Build the libamtrack: ```bash cmake -S . -B build -cmake --build build ``` Install the libamtrack: From 4ef08610e9ea4d0cff26d8dd842ab7a6344d9af7 Mon Sep 17 00:00:00 2001 From: diamant3 Date: Tue, 10 Oct 2023 21:12:07 +0800 Subject: [PATCH 05/10] fix end of code block --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e69fc801..cbcc0eee 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,7 @@ cmake -S . -B build Install the libamtrack: ```bash cmake --install build +``` # 3. CAN I USE LIBAMTRACK IN MY RESEARCH AND/OR MODIFY THE CODE? From 33a1e8719e96c6d208f4156caa0feafbb745d413 Mon Sep 17 00:00:00 2001 From: diamant3 Date: Tue, 10 Oct 2023 21:21:30 +0800 Subject: [PATCH 06/10] fix build command typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cbcc0eee..0eb8a988 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ cmake -S . -B build Build the libamtrack: ```bash -cmake -S . -B build +cmake --build build ``` Install the libamtrack: @@ -136,7 +136,7 @@ cmake -S . -B build Build the libamtrack: ```bash -cmake -S . -B build +cmake --build build ``` Install the libamtrack: From 21c0afa3199cdd1d288fcb24a9ed8fc2f0dfbcde Mon Sep 17 00:00:00 2001 From: diamant3 Date: Tue, 10 Oct 2023 21:22:23 +0800 Subject: [PATCH 07/10] fix build command typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0eb8a988..b12a226d 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ cmake -S . -B build Build the libamtrack: ```bash -cmake -S . -B build +cmake --build build ``` Install the libamtrack: From 51ab0cc487bfa0f48c225735f191101bd0574827 Mon Sep 17 00:00:00 2001 From: Diamond Rivero Date: Tue, 10 Oct 2023 21:29:41 +0800 Subject: [PATCH 08/10] Use `--parallel` compilation in building Co-authored-by: Leszek Grzanka --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b12a226d..62701bbb 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ cmake -S . -B build Build the libamtrack: ```bash -cmake --build build +cmake --build build --parallel ``` Install the libamtrack: From 48594347b5e1d1eaba82c6d072f3dfc8ad7d5256 Mon Sep 17 00:00:00 2001 From: Diamond Rivero Date: Tue, 10 Oct 2023 21:30:19 +0800 Subject: [PATCH 09/10] Use `--parallel` compilation in building Co-authored-by: Leszek Grzanka --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62701bbb..93d1341c 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ cmake -S . -B build Build the libamtrack: ```bash -cmake --build build +cmake --build build --parallel ``` Install the libamtrack: From 1efb2ef6466f81dcff89403007d9e7c93bedf2c6 Mon Sep 17 00:00:00 2001 From: Diamond Rivero Date: Tue, 10 Oct 2023 21:30:36 +0800 Subject: [PATCH 10/10] Use `--parallel` compilation in building Co-authored-by: Leszek Grzanka --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 93d1341c..b32cb8c5 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ cmake -S . -B build Build the libamtrack: ```bash -cmake --build build +cmake --build build --parallel ``` Install the libamtrack: