mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2024-11-25 07:06:52 -08:00
Adding the rest of the initial files and cleaning up CMakeLists.txt
This commit is contained in:
parent
0821823a68
commit
16b40a59ad
@ -103,5 +103,6 @@
|
||||
"*.hpp": "hpp",
|
||||
"*.asm": "asm"
|
||||
},
|
||||
"C_Cpp.default.intelliSenseMode": "linux-clang-x86"
|
||||
"C_Cpp.default.intelliSenseMode": "linux-clang-x86",
|
||||
"cmake.cmakePath": "/usr/bin/cmake"
|
||||
}
|
28
.clang-format
Normal file
28
.clang-format
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
Language: Cpp
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
UseTab: Never
|
||||
TabWidth: 4
|
||||
BreakBeforeBraces: Allman
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: false
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveDeclarations: true
|
||||
AlignConsecutiveMacros: true
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortNamespaceContentsOnASingleLine: false
|
||||
AllowShortTemplateFunctionsOnASingleLine: false
|
||||
AllowShortTypeConstraintsOnASingleLine: false
|
||||
AllowShortVariablesOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
17
.vs/ProjectSettings.json
Normal file
17
.vs/ProjectSettings.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"BuildOptions": {
|
||||
"Platform": "x86",
|
||||
"Configuration": "Debug",
|
||||
"OptimizationLevel": "None",
|
||||
"AdditionalCompilerOptions": "-m32",
|
||||
"AdditionalLinkerOptions": "-m32"
|
||||
},
|
||||
"DebuggingOptions": {
|
||||
"DebuggerType": "NativeOnly",
|
||||
"EnableUnmanagedDebugging": true
|
||||
},
|
||||
"DeploymentOptions": {
|
||||
"TargetArchitecture": "x86",
|
||||
"TargetOperatingSystem": "Windows"
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Error",
|
||||
"Microsoft": "Warning"
|
||||
},
|
||||
"Console": {
|
||||
"LogLevel": {
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
33
.vs/launch.vs.json
Normal file
33
.vs/launch.vs.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"version": "0.2.1",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug NASM Program",
|
||||
"projectTarget": "MyProject",
|
||||
"args": [],
|
||||
"program": "${workspaceFolder}/build/MyProject",
|
||||
"cwd": "${workspaceFolder}/build",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PATH",
|
||||
"value": "/path/to/nasm:/path/to/qemu:/path/to/gnu-ld:/path/to/dd:/path/to/clang:/path/to/gcc:/path/to/gnu-gdb:/path/to/lldb:${env:PATH}"
|
||||
}
|
||||
],
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"launchCompleteCommand": "exec-run",
|
||||
"miDebuggerPath": "/path/to/gnu-gdb",
|
||||
"miDebuggerArgs": "--interpreter=mi2",
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
25
.vs/tasks.vs.json
Normal file
25
.vs/tasks.vs.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Build",
|
||||
"type": "shell",
|
||||
"command": "nasm -f elf32 -o main.o main.asm && gcc -m32 -o main main.o",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run",
|
||||
"type": "shell",
|
||||
"command": "qemu-system-i386 -kernel main",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
@ -1 +1,17 @@
|
||||
cmake -DCMAKE_LINKER=/usr/bin/ld -DCMAKE_CXX_LINK_EXECUTABLE="<CMAKE_LINKER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>"
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
project(my_project C)
|
||||
|
||||
add_subdirectory(foo)
|
||||
add_subdirectory(bar)
|
||||
|
||||
add_library(foo foo.c)
|
||||
target_include_directories(foo PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_subdirectory(tests)
|
||||
|
||||
add_executable(foo_test foo_tests.c)
|
||||
target_link_libraries(foo_test foo)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
|
||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
|
||||
|
||||
|
65
build/CMakeCache.txt
Normal file
65
build/CMakeCache.txt
Normal file
@ -0,0 +1,65 @@
|
||||
# This is the CMakeCache file.
|
||||
# For build in directory: /media/gbowne1/18656299-5992-400a-a7a4-b6ffc4b0612f/Documents/ClassicOS/build
|
||||
# It was generated by CMake: /usr/bin/cmake
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
CMAKE_BUILD_TYPE:STRING=Debug
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
CMAKE_C_COMPILER:FILEPATH=/usr/bin/clang
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=/media/gbowne1/18656299-5992-400a-a7a4-b6ffc4b0612f/Documents/ClassicOS/build
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=13
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=4
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=/media/gbowne1/18656299-5992-400a-a7a4-b6ffc4b0612f/Documents/ClassicOS
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.13
|
||||
|
1
build/CMakeFiles/cmake.check_cache
Normal file
1
build/CMakeFiles/cmake.check_cache
Normal file
@ -0,0 +1 @@
|
||||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
0
src/boot/grub/grub.cfg
Normal file
0
src/boot/grub/grub.cfg
Normal file
0
src/boot/grub/menu.lst
Normal file
0
src/boot/grub/menu.lst
Normal file
Loading…
Reference in New Issue
Block a user