🎉 C project and base documentation.
parent
87460e35d1
commit
3493fda418
|
@ -0,0 +1,5 @@
|
|||
.cache
|
||||
*~*
|
||||
*\#*
|
||||
build
|
||||
doc/build
|
|
@ -0,0 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.28)
|
||||
|
||||
project(CoCoMango)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS On)
|
||||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(ccm)
|
|
@ -0,0 +1,12 @@
|
|||
.PHONY: build install check doc
|
||||
|
||||
build:
|
||||
cmake -B build
|
||||
cmake --build build
|
||||
|
||||
install: build
|
||||
sudo cmake --install build
|
||||
|
||||
check:
|
||||
@cppcheck --enable=all -q ccm lib \
|
||||
--suppress=missingIncludeSystem
|
|
@ -0,0 +1,18 @@
|
|||
cmake_minimum_required(VERSION 3.28)
|
||||
|
||||
project(ccm)
|
||||
|
||||
add_executable(ccm
|
||||
main.c
|
||||
)
|
||||
|
||||
set_property(TARGET ccm PROPERTY C_STANDARD 99)
|
||||
|
||||
add_dependencies(ccm ccm_lib)
|
||||
|
||||
target_link_libraries(ccm
|
||||
ccm_lib
|
||||
)
|
||||
|
||||
install(TARGETS ccm)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
all:
|
||||
sphinx-build src build
|
|
@ -0,0 +1,28 @@
|
|||
accessible-pygments==0.0.4
|
||||
alabaster==0.7.16
|
||||
Babel==2.14.0
|
||||
beautifulsoup4==4.12.3
|
||||
certifi==2024.2.2
|
||||
charset-normalizer==3.3.2
|
||||
docutils==0.20.1
|
||||
idna==3.6
|
||||
imagesize==1.4.1
|
||||
Jinja2==3.1.3
|
||||
MarkupSafe==2.1.5
|
||||
packaging==24.0
|
||||
pydata-sphinx-theme==0.15.2
|
||||
Pygments==2.17.2
|
||||
requests==2.31.0
|
||||
snowballstemmer==2.2.0
|
||||
soupsieve==2.5
|
||||
Sphinx==7.2.6
|
||||
sphinx-basic-ng==1.0.0b2
|
||||
sphinx-book-theme==1.1.2
|
||||
sphinxcontrib-applehelp==1.0.8
|
||||
sphinxcontrib-devhelp==1.0.6
|
||||
sphinxcontrib-htmlhelp==2.0.5
|
||||
sphinxcontrib-jsmath==1.0.1
|
||||
sphinxcontrib-qthelp==1.0.7
|
||||
sphinxcontrib-serializinghtml==1.1.10
|
||||
typing_extensions==4.10.0
|
||||
urllib3==2.2.1
|
|
@ -0,0 +1,4 @@
|
|||
project = 'CoCo Mango'
|
||||
version = '0.0.0'
|
||||
|
||||
html_theme = 'sphinx_book_theme'
|
|
@ -0,0 +1,7 @@
|
|||
CCM Documentation
|
||||
=================
|
||||
|
||||
.. toctree::
|
||||
|
||||
installation
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
CCM is not distributed as binaries, therefore you have to compile it yourself.
|
||||
But don't worry, once downloaded you can compile the project using only one command (``make install``).
|
||||
|
||||
Let's start. First, you have to get the source code of CCM. Then you have to build and install it.
|
||||
|
||||
Getting the source code
|
||||
-----------------------
|
||||
The easy way to get the sources is to download the source zip archive directly from
|
||||
`this link <https://git.shellbox.fr/bog/ccm/archive/main.zip>`_.
|
||||
All you have to do now is to unzip it.
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: Extracting the zip archive
|
||||
|
||||
# unzip the project source code
|
||||
unzip ccm-main.zip
|
||||
|
||||
# go to project directory
|
||||
cd ccm-main
|
||||
|
||||
|
||||
|
||||
If you have git installed on your system, you can get the repository with the command:
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: Cloning the repository
|
||||
|
||||
# clone the repository into the ccm directory
|
||||
git clone https://git.shellbox.fr/bog/ccm.git
|
||||
|
||||
# goto project directory
|
||||
cd ccm
|
||||
|
||||
|
||||
Get the sources here: https://git.shellbox.fr/bog/ccm
|
||||
|
||||
Building and Installing
|
||||
-----------------------
|
||||
Compiling CCM is easy. All you have to do, is type one command:
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: Installing CCM the quick way
|
||||
|
||||
# may ask you root access via sudo
|
||||
make install
|
||||
|
||||
However, if you want more control over the compilation and installation,
|
||||
you can use those 3 cmake commands to build the project the way you want.
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: Step 1/3 Initialize cmake
|
||||
|
||||
cmake -B build
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: Step 2/3 Compile CCM
|
||||
|
||||
cmake --build build
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: Step 3/3 Install CCM
|
||||
|
||||
cmake --install build
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
cmake_minimum_required(VERSION 3.28)
|
||||
|
||||
project(ccm_library)
|
||||
|
||||
add_library(ccm_lib
|
||||
node.c
|
||||
)
|
||||
|
||||
set_property(TARGET ccm_lib PROPERTY C_STANDARD 99)
|
||||
|
||||
target_compile_options(ccm_lib
|
||||
PUBLIC -Wall -Wextra -g
|
||||
)
|
||||
|
||||
target_include_directories(ccm_lib
|
||||
PUBLIC "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
install(TARGETS ccm_lib)
|
|
@ -0,0 +1 @@
|
|||
#include "node.h"
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef NODE_H
|
||||
#define NODE_H
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue