Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing CPP files to Make file, fixes #8731 #8738

Merged
merged 1 commit into from Dec 20, 2017

Conversation

lumbric
Copy link

@lumbric lumbric commented Dec 10, 2017

Fixes build errors occurring when AUTO_BED_LEVELING_UBL is enabled.

@thinkyhead
Copy link
Member

thinkyhead commented Dec 11, 2017

What happens if MESH_BED_LEVELING is enabled when building with the Makefile? How about if we enable MAX7219_DEBUG, PCA9632, and I2C_POSITION_ENCODERS?

Do we basically need to include every .cpp file in Marlin in CXXSRC?

@lumbric
Copy link
Author

lumbric commented Dec 11, 2017

Uh yes, you are right, the commit fixes the build only for my specific situation. I stopped adding cpp files, when I my configuration was building, but probably a generic solution would be better.
I don't think there is an easy way to determine which .cpp files are going to be needed without compiling them? Always compiling all .cpp files feels a bit of a wasted build time. But I guess it should be possible to make the .cpp files almost empty by using macros (if the feature is disabled which is implemented in this .cpp file).

What do you think? Any better suggestions or objections?

@thinkyhead
Copy link
Member

thinkyhead commented Dec 12, 2017

Arduino IDE and PlatformIO compile all .cpp files in the project folder, so the Makefile should too. Here's how to do it without needing to list every file:

https://stackoverflow.com/questions/2908057/can-i-compile-all-cpp-files-in-src-to-os-in-obj-then-link-to-binary-in

Fixes build errors occurring when AUTO_BED_LEVELING_UBL is enabled.
@lumbric
Copy link
Author

lumbric commented Dec 16, 2017

I have updated the fix. Now all *.cpp files are compiled.

@thinkyhead
Copy link
Member

Magic!

thinkyhead added a commit that referenced this pull request Dec 20, 2017
@thinkyhead thinkyhead merged commit ea345b1 into MarlinFirmware:bugfix-1.1.x Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants