Skip to content

Build: core/Makefile - Major overhaul#647

Open
HeckHeckHeckHeck wants to merge 2 commits intoelectro-smith:masterfrom
HeckHeckHeckHeck:build_core_overhaul
Open

Build: core/Makefile - Major overhaul#647
HeckHeckHeckHeck wants to merge 2 commits intoelectro-smith:masterfrom
HeckHeckHeckHeck:build_core_overhaul

Conversation

@HeckHeckHeckHeck
Copy link
Copy Markdown
Contributor

@HeckHeckHeckHeck HeckHeckHeckHeck commented Sep 24, 2024

Aims And Claims

  • Build is fully customizable now from the "User Project" without any changes required in this repo
  • Fully backwards compatible with prior version (regression tested with latest DaisyExamples and DaisyBlinkProject)
  • Separate interface from implementation and present it with more detailed documentation on how to use

Changes

  • Add Makefile.conf - declarative build settings interface
  • Fix: support of user defined CFLAGS, CXXFLAGS, ASFLAGS, LDFLAGS
  • Fix: support build config from shell env vars
  • Fix: debug symbols now only in DEBUG build
  • Feature: support user defined suffix for c++ files (USER_SUFFIX_CXX)
  • Provide structure and process to remove items from flags and lists (not just appending to it)
  • Structure the customization into three documented levels of build customization needs (Required, Optional, DangerZone)
  • More error handling of build mis-configuration (warn/error messages)

New Build Options

  • STARTUP_CODE {ASM, C}
  • USER_SUFFIX_CXX
  • C_STANDARD
  • CXX_STANDARD
  • GCC_SPECS
  • new APP_TYPE 'CUSTOM' - allows custom linkerscript
  • LDSCRIPT

@HeckHeckHeckHeck HeckHeckHeckHeck marked this pull request as ready for review September 25, 2024 02:28
@HeckHeckHeckHeck
Copy link
Copy Markdown
Contributor Author

i still think it present a cleaner, more declarative layer to the makefile based build.
bit up to taste as well, so no worries if you dont like it @stephenhensley.

@stephenhensley
Copy link
Copy Markdown
Collaborator

@HeckHeckHeckHeck this is on my list to get to looking at either for this release or the next.
I've been working through things from newest-first, but this one should be coming up soon (most likely within this month).

I agree that this may be a better approach to the make build, and make user-level customizations more accessible.
It being backwards compatible is a huge boon as well.

While I am gradually moving to CMake (mostly to better integrate with a desktop prototyping environment i've been tinkering with), most of my projects are still using the Make build system.

I have several projects that have a bit of extra settings in their Makefiles. So I'm planning on going through several of them to confirm backwards compatibility, and see how the changes may allow me (and others) to potentially simplify their own Makefiles a bit.

If there are no issues w/ compatibility, etc. I expect this should be mergeable.
In case the trill PR is mergeable before I have a chance to go through this testing, feel free to hold off on resolving the merge conflicts for now (unless you'd like to sync up early).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants