diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a5e2488 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 2.6) +project(MMMCalc) + +set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic-errors") +set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -O0") +set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -O3") +set(CMAKE_C_FLAGS_MIN_SIZEREL "${CMAKE_C_FLAGS} -Os") + +set(SRCS + src/Main.c) + +add_executable(mmmcalc ${SRCS}) diff --git a/README.md b/README.md index 92fe11b..339b70a 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ MMMCalc ======= -This is a very simple project, it was made for educational purposes (hence why it is open-source), and I encourage everyone to contribute if they have something to add. - -###Compiling -To compile make sure you have JDK and Apache Ant installed. Then run the following command in the root directory of the project: +### Compiling +MMMCalc uses [CMake](http://cmake.org/) to compile. Please install the C development tools and CMake (along with whichever build script you plan on having CMake generate) in order to run this command. ```bash -$ ant +$ cd build/ +$ cmake .. +$ make ``` -###Contributing -To contribute, simply open a pull request. +### Contributing +To contribute, simply open a pull request, however, be aware that this code is licensed under a GNU GPLv3 and so will yours. -###License +### License All code in this repository is under the [GNU GPLv3](/LICENSE). diff --git a/src/Main.c b/src/Main.c new file mode 100644 index 0000000..c1fe429 --- /dev/null +++ b/src/Main.c @@ -0,0 +1,14 @@ +#include + +// 0 = false; +// 1 = true; +char version[16] = "v0.5"; +int verbose = 0; + +int main(int argc, char **argv) { + printf("MMMCalc %s, Copyright (c) 2016 Nicolás A. Ortega.\n", version); + printf("This program comes with ABSOLUTELY NO WARRANTY.\n"); + printf("This program is free software and you are welcome to redistribute\n"); + printf("under the terms and conditions of the GNU GPLv3 or higher.\n\n"); + return 0; +}