A simple makefile based CPP project generator
-
It allow you to create in one command a simple, ready to use, C++ project.
-
This project will be able to build C++ and C files (main function still must be in c++).
-
You can also generate a compile_commands.json file for your text editor.
-
To create a project :
make projectName
This will create a folder with a simple HelloWorld project that you can modify at you will.
-
Move into that directory :
cd projectName
-
Add your files into the right directories (cf folder structure down below).
-
Add the source files that you want to build to the right variables in the makefile (this will be externalised) :
SRC= myFile1.c myFile2.c SRCPP= myFile1.cpp myFile2.cpp
-
Build your project :
make
-
Run your program :
./projectName
-
You can also generate the compile_commands.json with the following command :
make compile_commands.json
-
include/
contains all the headers files (*.h, *.hpp, ...)
-
src/
contains all sources files (*.c, *.cpp)
-
obj/
contains all the build files (*.c.o, -.cpp.o).
-
compil/
contains all the partial files for the compile_commands.json
-
makefile
the makefile that build
-
projectName
the executable generated (if built)
-
compile_commands.json
the compile_commands file (if built)
-
help target
-
a file dedicated for variables
-
add non-system libary support
-
better logging on build