Last Updated: February 25, 2016
·
1.452K
· daltoniam

Linux build script

Today I had finally had enough of not having a good way of building my code on Linux. Now I know what you are thinking, "we have Make files, stupid Linux noob". I will not lie, I am by no means a Linux pro and still have a lot to learn about it and Make itself. Make files are great for a lot of things and the defacto standard for building code on Linux. My main problem is that you have to have a brand new make file every time you want to make a new app or edit the file when you add new source files. I do most of my work in XCode so this is an inconvenience that I have been spoiled to overlook. I wanted an easy way to quickly build an app or my library and not have to write a make file every time I needed to build something, thus I created gpbuild. It is a very simple python script that uses a YAML config file to build a large or small code base in one step. Check it out here:

https://github.com/daltoniam/GPBuild

how it works:

It works by recursively searching the directories in the config file for c or cpp and passing them to g++ . Simple and makes for a easy way to build your apps.

3 Responses
Add your response

What about the speed ? Must be slower for sure, Right?

over 1 year ago ·

@vinitcool76 yes it probably is. I haven't run any benchmarks yet and there are probably some g++ optimizations I could do as well. I am building a 40 file static library and a simple test app and it takes less than a second, which is bearable to me for the simplicity. I am not trying to justify a performance loss in anyway, but considering the time I will probably save from not having to create make files, I think it is a usable solution.

over 1 year ago ·

Cool man, Will try and contribute to it. I really appreciate your effort. :)

over 1 year ago ·