Skip to content

SombrePigeon/cppProjectGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CppProjectGenerator

A simple makefile based CPP project generator

What does it do ?

  • 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.

How to use

  • 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

Folder structure of a project

  • 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)

To_Do

  • help target

  • a file dedicated for variables

  • add non-system libary support

  • better logging on build

About

A simple makefile based CPP project generator

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors