To make or not to make?
Posted: Sat Aug 06, 2011 10:48 am
As a private (mostly auto-didactic) project, I'm writing a simple IDE (in the hope that someday, I'll be able to use it myself). I've completed most of the basic editing features and already designed the project system. Soon I will have to be dealing with building. I'm not sure as of what choice to make at this point, so I was hoping you could help shed some light as to the (dis)advantages of either choice: I have to choose whether or not to use a make-based build system (thus, using makefiles).
If I use makefiles, this is basically what the IDE is going to be doing:
Makefile-based:
So both solutions have their upsides. I'm really not sure with which one to go, which is why I'd like to hear some opinions on the subject, see what other people think about this.
If I use makefiles, this is basically what the IDE is going to be doing:
- Project is created, basic makefile is automatically generated (unless the user chooses to use a custom makefile).
- If needed, the makefile is updated when needed (e.g. new files are added to the project).
- A user specifies a valid make executable which will be called on the makefile in question.
- Any messages output by make (and tools such as GCC), such as error messages and warnings, will be placed in a convenient widget.
- The user defines what tools are used for what file extensions. All the project's files (unless excluded from build), are fed into the build system. It will determine which tool to call for what file and make sure all the processor cores are properly utilized.
- Messages output by any of the tools (such as GCC) will be placed in a widget, just like with make.
Makefile-based:
- Make and makefiles are well-known, mature and most programmers know about them.
- No need to write a custom build system, make will handle calling the appropriate file on the appropriate moment.
- Dependencies will be handled for you.
- Make's behaviour can be altered through command line switches. Running multiple jobs simultaneously is supported out-of-the-box.
- Most UNIX or Linux-based systems come with make shipped.
- Very newbie-friendly: they might either not know what make is, not be able to find a precompiled binary, or build it from source (this especially applies on Windows).
- No need for third-party software to be used (building is supported out-of-the-box).
- Less setup required to get building properly working.
- An internal build system is more tightly integrated with the IDE, allowing for it to be optimized and designed specifically for use with that software product.
So both solutions have their upsides. I'm really not sure with which one to go, which is why I'd like to hear some opinions on the subject, see what other people think about this.