diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..70b834f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Clangd +/.cache + +/build \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..67008eb --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.5) +project(onus VERSION 0.1 LANGUAGES C) + +option(BUILD_SHARED_LIBS "Build using shared libraries" ON) + +set(CMAKE_C_STANDARD 90) + +add_subdirectory(pkg/common) +add_subdirectory(pkg/fs) \ No newline at end of file diff --git a/compile_flags.txt b/compile_flags.txt deleted file mode 100644 index f56d7e0..0000000 --- a/compile_flags.txt +++ /dev/null @@ -1,2 +0,0 @@ --xc --std=c89 \ No newline at end of file diff --git a/pkg/common/CMakeLists.txt b/pkg/common/CMakeLists.txt new file mode 100644 index 0000000..2f9d1df --- /dev/null +++ b/pkg/common/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(onus_common INTERFACE) +add_library(onus::common ALIAS onus_common) +target_include_directories(onus_common INTERFACE include) \ No newline at end of file diff --git a/pkg/fs/CMakeLists.txt b/pkg/fs/CMakeLists.txt new file mode 100644 index 0000000..0f89bba --- /dev/null +++ b/pkg/fs/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(onus_fs) +add_library(onus::fs ALIAS onus_fs) +target_sources(onus_fs PRIVATE src/copymove.c) +target_include_directories(onus_fs PUBLIC include) +target_link_libraries(onus_fs PRIVATE onus::common) \ No newline at end of file diff --git a/pkg/fs/src/Makefile.am b/pkg/fs/src/Makefile.am deleted file mode 100644 index 46c893b..0000000 --- a/pkg/fs/src/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -bin_PROGRAMS = hello -hello_SOURCES = copymove.c \ No newline at end of file