first commit
This commit is contained in:
commit
cdcd18ea66
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Build results
|
||||||
|
bin/
|
||||||
|
obj/
|
||||||
|
|
||||||
|
# user files
|
||||||
|
.old*/
|
||||||
|
.vs/
|
||||||
|
.vshistory/
|
||||||
|
.editorconfig
|
||||||
|
*.user
|
||||||
|
*.vcxproj.filters
|
||||||
|
current.config
|
||||||
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[submodule "cbuild"]
|
||||||
|
path = cbuild
|
||||||
|
url = https://github.com/Timerix22/cbuild.git
|
||||||
|
[submodule "kerep"]
|
||||||
|
path = kerep
|
||||||
|
url = https://github.com/Timerix22/kerep.git
|
||||||
1
.vscode/.gitignore
vendored
Normal file
1
.vscode/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
settings.json
|
||||||
27
.vscode/launch.json
vendored
Normal file
27
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "(gdb) Debug",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/bin/scolte.exe",
|
||||||
|
"preLaunchTask": "build_exec_dbg",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"cwd": "${workspaceFolder}/bin",
|
||||||
|
"externalConsole": false,
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"miDebuggerPath": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "-gdb-set disassembly-flavor intel",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
31
.vscode/tasks.json
vendored
Normal file
31
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build_exec_dbg",
|
||||||
|
"detail": "build project with debug symbols",
|
||||||
|
"type": "cppbuild",
|
||||||
|
"command": "make",
|
||||||
|
"args": [
|
||||||
|
"build_exec_dbg"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
"problemMatcher": ["$gcc"],
|
||||||
|
"group": {
|
||||||
|
"kind": "build"
|
||||||
|
},
|
||||||
|
"presentation": {
|
||||||
|
"echo": true,
|
||||||
|
"reveal": "always",
|
||||||
|
"focus": true,
|
||||||
|
"panel": "shared",
|
||||||
|
"showReuseMessage": false,
|
||||||
|
"clear": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
18
Makefile
Normal file
18
Makefile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
all: build_exec
|
||||||
|
|
||||||
|
##### Build cbuild/default_tasks ######
|
||||||
|
build_exec:
|
||||||
|
@cbuild/call_task.sh build_exec
|
||||||
|
build_exec_dbg:
|
||||||
|
@cbuild/call_task.sh build_exec_dbg
|
||||||
|
|
||||||
|
##### Launch cbuild/default_tasks ######
|
||||||
|
exec: build_exec
|
||||||
|
@cbuild/call_task.sh exec
|
||||||
|
|
||||||
|
valgrind: build_exec_dbg
|
||||||
|
@cbuild/call_task.sh valgrind
|
||||||
|
|
||||||
|
##### Recompile kerep.a ######
|
||||||
|
rebuild_kerep:
|
||||||
|
@cbuild/call_task.sh rebuild_kerep
|
||||||
2
README.md
Normal file
2
README.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# SCoLTE - Simple Command-Line Text Editor
|
||||||
|
I just wanted to edit text files from terminal, not to memorize a ton of weird shortcuts for nano or vim. So here it is - easy to use text editor.
|
||||||
1
cbuild
Submodule
1
cbuild
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 81358b72f8dc602d694f46ea42c2b64d9b0b41c6
|
||||||
57
default.config
Normal file
57
default.config
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
CBUILD_VERSION=4
|
||||||
|
CONFIG_VERSION=1
|
||||||
|
|
||||||
|
PROJECT=scolte
|
||||||
|
CMP_C=gcc
|
||||||
|
CMP_CPP=g++
|
||||||
|
STD_C=c11
|
||||||
|
STD_CPP=c++17
|
||||||
|
WARN_C="-Wall -Wno-discarded-qualifiers"
|
||||||
|
WARN_CPP="-Wall"
|
||||||
|
SRC_C="$( find src -name '*.c')"
|
||||||
|
SRC_CPP="$( find src -name '*.cpp')"
|
||||||
|
#TESTS_C="$( find tests -name '*.c')"
|
||||||
|
#TESTS_CPP="$(find tests -name '*.cpp')"
|
||||||
|
|
||||||
|
OUTDIR=bin
|
||||||
|
OBJDIR=obj
|
||||||
|
PRE_TASK_SCRIPT=tasks/pre_build.sh
|
||||||
|
POST_TASK_SCRIPT=
|
||||||
|
|
||||||
|
case $OS in
|
||||||
|
WINDOWS)
|
||||||
|
EXEC_FILE=$PROJECT.exe
|
||||||
|
;;
|
||||||
|
LINUX)
|
||||||
|
EXEC_FILE=$PROJECT
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf "${RED}operating system $OS has no configuration variants\n"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $TASK in
|
||||||
|
build_exec)
|
||||||
|
C_ARGS="-O2"
|
||||||
|
CPP_ARGS="$C_ARGS"
|
||||||
|
LINKER_ARGS=""
|
||||||
|
TASK_SCRIPT=cbuild/default_tasks/build_exec.sh
|
||||||
|
KEREP_BUILD_TASK=build_static_lib
|
||||||
|
;;
|
||||||
|
build_exec_dbg)
|
||||||
|
C_ARGS="-O0 -g"
|
||||||
|
CPP_ARGS="$C_ARGS"
|
||||||
|
LINKER_ARGS=""
|
||||||
|
TASK_SCRIPT=cbuild/default_tasks/build_exec.sh
|
||||||
|
KEREP_BUILD_TASK=build_static_lib_dbg
|
||||||
|
;;
|
||||||
|
exec)
|
||||||
|
TASK_SCRIPT=cbuild/default_tasks/exec.sh
|
||||||
|
;;
|
||||||
|
valgrind)
|
||||||
|
VALGRIND_ARGS="-s --log-file=valgrind.log --read-var-info=yes --track-origins=yes --fullpath-after=$PROJECT/ --leak-check=full --show-leak-kinds=all"
|
||||||
|
TASK_SCRIPT=cbuild/default_tasks/valgrind.sh
|
||||||
|
;;
|
||||||
|
esac
|
||||||
1
kerep
Submodule
1
kerep
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d2eb241d0df5c88958888afa9f577c3dd1414d21
|
||||||
10
src/main.c
Normal file
10
src/main.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include "../kerep/src/Filesystem/filesystem.h"
|
||||||
|
|
||||||
|
int main(const int argc, const char* const* argv){
|
||||||
|
kprintf("\e[37margs:");
|
||||||
|
for(int i=0; i<argc; i++)
|
||||||
|
kprintf(" %s", argv[i]);
|
||||||
|
kprintf("\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
13
tasks/pre_build.sh
Normal file
13
tasks/pre_build.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -f "kerep/bin/kerep.a" ] || [ -f .rebuild_kerep ]
|
||||||
|
then
|
||||||
|
cd kerep
|
||||||
|
if ! make "$KEREP_BUILD_TASK"; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd ..
|
||||||
|
rm -rf .rebuild_kerep
|
||||||
|
fi
|
||||||
|
cp kerep/bin/kerep.a obj/
|
||||||
|
printf "${GREEN}copied ${CYAN}kerep.a\n"
|
||||||
3
tasks/rebuild_kerep.sh
Normal file
3
tasks/rebuild_kerep.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
touch .rebuild_kerep
|
||||||
|
printf "kerep.a will be rebuilt in the next build task"
|
||||||
Loading…
Reference in New Issue
Block a user