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

[ENHANCEMENT] Proposal for Enhancing Makefile Optimization #4297

Open
Syspretor opened this issue Aug 27, 2024 · 4 comments
Open

[ENHANCEMENT] Proposal for Enhancing Makefile Optimization #4297

Syspretor opened this issue Aug 27, 2024 · 4 comments
Assignees
Labels
features features

Comments

@Syspretor
Copy link
Collaborator

Syspretor commented Aug 27, 2024

Hello everyone,

I've been working with our Makefile and I noticed that there are several areas where we can improve its structure and functionality. Optimizing the Makefile can lead to better maintainability, faster builds, and improved clarity for new contributors.

Here are a few best practices I believe we could implement:

  1. Use of Variables: Defining variables for compiler flags, directories, and sources can simplify edits and enhance readability.

  2. Phony Targets: Adding .PHONY for non-file targets helps avoid conflicts with files of the same name.

  .PHONY: all clean
  1. Automatic Dependency Generation: This can help manage header files automatically, ensuring the correct recompilation of files as needed.

  2. Modularization: Breaking down the Makefile into multiple smaller files if it gets too complex will help keep things organized.

  3. Improved Clean Targets: Including more thorough clean up options to ensure no residual files are left behind.

I would love to hear from others about their experiences and thoughts on these proposals. If anyone is interested, we could collaborate on updating the Makefile together!

References
GNU Make Manual
Makefile Best Practices

@Syspretor Syspretor added the features features label Aug 27, 2024
@omerap12
Copy link
Member

I would glad to help :)

@Syspretor
Copy link
Collaborator Author

Thanks for your help! @omerap12
I hope that before we actually start coding, we can identify a few specific directions for optimizing the makefile. Later, I will summarize some directions. If you have any suggestions, please feel free to bring them up, and let’s see which ones you are interested in.

@Syspretor
Copy link
Collaborator Author

/assign @omerap12

@omerap12
Copy link
Member

omerap12 commented Sep 2, 2024

Sounds good, @Syspretor .
Keep me posted :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features features
Projects
None yet
Development

No branches or pull requests

2 participants