Makefile generator using some flags and "vars" to create makefile easier. It is crated for Windows but you can edit first function (i.e. GetExePath(...)) for properly work for another system.
Just add mgen folder to PATH string.
There are some flags that you can use:
- Create directory Test with simple any.cpp file.
- Go to path with Test in console.
- Type
mgen
in console.
Now put any.cpp to any folder (e.g. Test/Src) and type mgen
again.
It will find every single .cpp file in folder with project.
Works with multiple files and folders.
Can have only one assigned value: -S -O -a -c
Add more than one value to unique strings: -I -L -l -v -f
For more infomation about flags type...
mgen help
...or read help file in directory with mgen.
You can create mgen file in the same place when the makefile will be created and put there any commands, separated by enters or spaces. When you run mgen with -c
(clear commands) flag it will ignore searching mgen file.
In directory with mgen just edit adders file and put there some commands.
Separate commands +VAR_NAME
for create new vars.
You can run all commands by typing -v
flag with var name (e.g. -vSFML
).
Example of adders file:
+SFML
-lsfml-graphics -lsfml-system -lsfml-window
-ID:\Dev\Libraries\SFML\2.4.2\include
-LD:\Dev\Libraries\SFML\2.4.2\lib
+Boost
-ID:/Dev/CORE/boost_1_65_1
-LD:/Dev/CORE/boost_1_65_1/stage/lib
mgen
mgen -Ssrc
mgen -fstd=c++11 -Ssrc -Oobj
mgen -ISFML/include -LSFML/lib -lsfml-window -lsfml-system -lsfml-
- Boost - to search directories easier