From c2ba7ae099a7b9c11ce5f1f7e2856314d13c9bd6 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 4 Apr 2024 14:15:29 +0200 Subject: [PATCH] cmake --- .gitignore | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 8 +++++++ README.md | 3 +-- src/hello.c | 7 ++++++ 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 src/hello.c diff --git a/.gitignore b/.gitignore index f9ccf6d..9ced864 100644 --- a/.gitignore +++ b/.gitignore @@ -176,3 +176,61 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +# C stuff +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +CMakeFiles +CMakeCache.txt +Makefile +cmake_install.cmake +bin diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c6d52f2 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.5) + +project(base) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +include_directories(${PROJECT_SOURCE_DIR}) +add_executable( hello src/hello.c ) diff --git a/README.md b/README.md index 6afdec7..d5495fb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ -# Baserepo +# DHBW OS Lecture Notes and Code ## License -GPL-3 or newer See [License] diff --git a/src/hello.c b/src/hello.c new file mode 100644 index 0000000..7bb4d5c --- /dev/null +++ b/src/hello.c @@ -0,0 +1,7 @@ +#include + +int main(int argc, char *argv[]) +{ + printf("hello world!\n"); + return 0; +}