How can I include sub makefiles?

Sysprogs forums Forums VisualGDB How can I include sub makefiles?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9028
    t123yh
    Participant

    I’m using STM32F103 with FreeRTOS and uGFX. uGFX asks me to include their makefile but I don’t know how to do it without breaking current project structure.

    https://wiki.ugfx.io/index.php/Getting_Started
    <h3><span id=”Makefiles” class=”mw-headline”>Makefiles</span></h3>
    The uGFX library comes with a built-in Makefile system (which is not mandatory to be used, see Single File Inclusion below). If your IDE / Project allows to use external, existing Makefiles, we highly recommend using this method of adding uGFX to your project.

    Step-by-Step guide:

    1. Set the <b>GFXLIB</b> variable to the path pointing to the µGFX library root directory
    2. Include the main µGFX Makefile <i>(/ugfx/gfx.mk)</i>
    3. Add <b>GFXSRC</b> to the sources variable/list
    4. Add <b>GFXINC</b> to the include paths variable/list
    5. Include additional Makefiles of the µGFX library to include board files, drivers, …
    #9031
    support
    Keymaster

    Hi,

    We would not recommend just including a 3rd-party Makefile directly into your main VisualGDB project, as it may cause some variable conflicts and other strange bugs.

    We would instead recommend creating a new static library project for the GFX library, adding its sources to the project, specifying the include directories via the VisualGDB Project Properties, ensuring it builds and referencing it from the main project. If this does not work, please share the error messages you are getting and we will help you resolve them.

    If you want to try including the Makefile nonetheless, you can edit the project’s Makefile as follows (after the normal SOURCEFILES := … line):

    GFXLIB := <path to uGFX>
    include <uGFX makefile>
    SOURCEFILES += $(GFXSRC)
    INCLUDE_DIRS += $(GFXINC)

     

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.