Adding the C code.
I'm keeping the Java file for now as reference.
This commit is contained in:
parent
f7a0384ff3
commit
3675ee066f
13
CMakeLists.txt
Normal file
13
CMakeLists.txt
Normal file
@ -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})
|
10
README.md
10
README.md
@ -1,16 +1,16 @@
|
|||||||
MMMCalc
|
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
|
### Compiling
|
||||||
To compile make sure you have JDK and Apache Ant installed. Then run the following command in the root directory of the project:
|
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
|
```bash
|
||||||
$ ant
|
$ cd build/
|
||||||
|
$ cmake ..
|
||||||
|
$ make
|
||||||
```
|
```
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
To contribute, simply open a pull request.
|
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).
|
All code in this repository is under the [GNU GPLv3](/LICENSE).
|
||||||
|
14
src/Main.c
Normal file
14
src/Main.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user