build scripts updated
This commit is contained in:
parent
930aa029d3
commit
21709b788a
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
# build results
|
||||
bin/
|
||||
obj/
|
||||
libs/
|
||||
*.log
|
||||
*.tmp
|
||||
|
||||
@ -11,6 +12,6 @@ obj/
|
||||
*.user
|
||||
*.vcxproj.filters
|
||||
|
||||
# other files
|
||||
# user files
|
||||
.old*/
|
||||
current.config
|
||||
|
||||
14
README.md
14
README.md
@ -8,9 +8,21 @@ GUI is based on [Dear ImGui](https://github.com/ocornut/imgui) and [SDL](https:/
|
||||
```shell
|
||||
git clone --recurse-submodules https://github.com/Timerix22/GraphC
|
||||
```
|
||||
2. Install **SDL2** from package manager or compile it from source (read [SDL docs](SDL/docs/README.md)).
|
||||
2. Install **SDL2** from package manager or compile it from source
|
||||
```shell
|
||||
cd SDL2
|
||||
./configute
|
||||
make -j [number of cpu cores]
|
||||
make install
|
||||
# on windows
|
||||
mkdir ../libs
|
||||
cp ./build/.libs/*.dll ../libs/
|
||||
```
|
||||
If it didn't work, read [SDL docs](SDL2/docs/README.md) and [INSTALL.txt](SDL2/INSTALL.txt)).
|
||||
|
||||
3. Compile the program
|
||||
```shell
|
||||
make build_exec
|
||||
```
|
||||
|
||||
4. Copy program files from `bin/*` to any directory
|
||||
|
||||
2
cbuild
2
cbuild
@ -1 +1 @@
|
||||
Subproject commit d72aa0c8098fe2a427e50355250f473d70886502
|
||||
Subproject commit 2bebe76c7e14155392a167bdda61113d0039e188
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
CBUILD_VERSION=6
|
||||
CONFIG_VERSION=2
|
||||
CONFIG_VERSION=3
|
||||
|
||||
PROJECT="GraphC"
|
||||
CMP_C="gcc"
|
||||
@ -26,11 +26,13 @@ OUTDIR="bin"
|
||||
case "$OS" in
|
||||
WINDOWS)
|
||||
EXEC_FILE="$PROJECT.exe"
|
||||
INCLUDE="-I./imgui -I/usr/include/SDL2"
|
||||
LINKER_LIBS="-L./$OBJDIR/libs/ -lSDL2 -lopengl32"
|
||||
;;
|
||||
LINUX)
|
||||
EXEC_FILE="$PROJECT"
|
||||
INCLUDE="-I./imgui -I/usr/include/SDL2"
|
||||
LINKER_SHARED_LIBS="-lSDL2 -lGL"
|
||||
LINKER_LIBS="-lSDL2 -lGL"
|
||||
;;
|
||||
*)
|
||||
error "operating system $OS has no configuration variants"
|
||||
@ -52,7 +54,7 @@ case "$TASK" in
|
||||
# -fuse-linker-plugin is required to use static libs with lto, it strips away all
|
||||
C_ARGS="-O2 -flto=auto -fuse-linker-plugin -fprofile-use -fprofile-prefix-path=$(realpath $OBJDIR)/objects"
|
||||
CPP_ARGS="$C_ARGS"
|
||||
LINKER_ARGS="$CPP_ARGS $LINKER_SHARED_LIBS"
|
||||
LINKER_ARGS="$CPP_ARGS $LINKER_LIBS"
|
||||
PRE_TASK_SCRIPT=tasks/pre_build.sh
|
||||
TASK_SCRIPT=cbuild/default_tasks/build_exec.sh
|
||||
KEREP_BUILD_TASK=build_static_lib
|
||||
@ -61,7 +63,7 @@ case "$TASK" in
|
||||
build_exec_dbg)
|
||||
C_ARGS="-O0 -g"
|
||||
CPP_ARGS="$C_ARGS"
|
||||
LINKER_ARGS="$CPP_ARGS $LINKER_SHARED_LIBS"
|
||||
LINKER_ARGS="$CPP_ARGS $LINKER_LIBS"
|
||||
PRE_TASK_SCRIPT=tasks/pre_build.sh
|
||||
TASK_SCRIPT=cbuild/default_tasks/build_exec.sh
|
||||
KEREP_BUILD_TASK=build_static_lib_dbg
|
||||
|
||||
2
imgui
2
imgui
@ -1 +1 @@
|
||||
Subproject commit ed66d7c4a5bf09743bc9c719e65479c93783f1e6
|
||||
Subproject commit 3e08a7e76e7e275e90d22d9081c01e0515d187b0
|
||||
@ -1 +0,0 @@
|
||||
Subproject commit ed66d7c4a5bf09743bc9c719e65479c93783f1e6
|
||||
@ -2,3 +2,5 @@
|
||||
|
||||
myprint "${WHITE}deleting .kerep_rebuild.tmp"
|
||||
rm -rf .kerep_rebuild.tmp
|
||||
myprint "${WHITE}deleting .imgui_rebuild.tmp"
|
||||
rm -rf .imgui_rebuild.tmp
|
||||
|
||||
@ -22,3 +22,6 @@ function handle_static_dependency {
|
||||
|
||||
handle_static_dependency kerep $KEREP_BUILD_TASK
|
||||
handle_static_dependency imgui $KEREP_BUILD_TASK
|
||||
|
||||
# copy all precompiled libs
|
||||
cp libs/* $OBJDIR/libs/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user