Skip to content

Commit

Permalink
Updated build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sun Dro committed Jul 22, 2023
1 parent 693dcc3 commit d0e8afa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ cd libxutils
./build.sh cmake --install --cleanup
```

You can either choose `cmake` or `smake` as the first argument, but `cmake` is recommended on platforms other than the Linux.
You can either choose `cmake`, `smake` or `make` as the first argument, but `cmake` is recommended on the platforms other than the Linux.

#### Using Makefile
If you do not have any of the above tools installed on your operating system, then you can try the build by using already generated `Makefile` for linux.
The project can also be built with a pre-generated `Makefile` for linux.

```bash
git clone https://github.com/kala13x/libxutils.git
Expand Down
16 changes: 13 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,22 @@ build_tools() {
build_library() {
cd $PROJ_PATH

if [[ $MAKE_TOOL == "cmake" ]]; then
mkdir -p build && cd build && cmake ..
if [[ $MAKE_TOOL == "make" ]]; then
make -j $CPU_COUNT
LIB_PATH=$PROJ_PATH
elif [[ $MAKE_TOOL == "smake" ]]; then
smake . && make -j $CPU_COUNT
LIB_PATH=$PROJ_PATH
elif [[ $MAKE_TOOL == "cmake" ]]; then
mkdir -p build && cd build
cmake .. && make -j $CPU_COUNT
LIB_PATH=$PROJ_PATH/build
else
echo "Unknown build tool: $MAKE_TOOL"
echo "Specify cmake, smake or make)"
exit 1
fi

make -j $CPU_COUNT
cd $PROJ_PATH
}

Expand Down

0 comments on commit d0e8afa

Please sign in to comment.