Jump to content

[FEATURE] Added the ability to compile ugfx as a single file


Recommended Posts

UGFX is typically compiled using a makefile system.

Whilst this is great for most platforms, some IDE's do not allow external makefile build projects and it can be difficult to work out which source files need including and which ones should not be included. This is particularly relevant on platforms like Arduino were the compiler does not allow libraries to have include paths other than the master source directory.

To help with these platforms we have added a "single file" source compilation.

Simply add "src/gfx_mk.c" to your IDE project and it will automatically include all other ugfx source except for drivers and board files.

Note: the master gfx.h file will still need to be on your include path.

There are still some limitations with this single file compilation in that inclusion of functions from third party libraries may not at this time work correctly (FAT, PETITFS, TinyGL etc). There is also an issue with user supplied fonts (with a simple work-around). We will work to resolve these issues as we get to testing them.

For those that would like to play with the single file compilation using the standard ugfx make, we have added a new make option.

Set GFXSINGLEFILE=yes in your makefile and it will use the new single file compile. In our in house testing this decreases the compile time from 14 seconds to 2 seconds :)

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...