-
Notifications
You must be signed in to change notification settings - Fork 143
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 generic makefiles for Linux C code #6
Conversation
@teodutu , please add that lengthier description from the PR in the commit message. |
efbae71
to
ad0aec5
Compare
da13d8b
to
96487d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added comments on using variables. And likely using defs.mk
for very simple definitions.
96487d2
to
483e465
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments. Then this can be approved and merged.
483e465
to
8c62e91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments. Please also include a debug.h
header file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would give up debug.h
all together. And simply import this logging library.
It's simple, easy to use has a lot of stars, and we can improve it for our work (there are a lot of PRs that we can take inspiration from). It's MIT Licensed, compatible with BSD-3-Clause.
We would simply add the two files (log.c
and log.h
) in the common/folder/
. We would include log.h
and link against link.c
.
Aggreed. How do you say we should cite / give credit to this library? |
I think you would just add it to the repository and add a comment line in both files to mention the licensing and reference the GitHub link. |
e1c49e8
to
ee7ad0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teodutu , I added a test inside the common/
folder and made minor updates to log/
and utils.h
. See the commits and see if it's OK with you.
I've also made two minor inline comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All OK with me. Merge it, @teodutu .
They cover the following use cases: - creating a single executable using multiple files (`single.mk`); - creating multiple executables, each based on a single source code file (`multiple.mk`). - logging and error messages via `utils/utils.h` and `utils/log/log.c` For other use cases, use `linux.mk` and create a custom makefile. The makefiles are based on those used in the "Hardware-Software Interface" course, which were added here: systems-cs-pub-ro/iocla#89. Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
983be28
to
ce0ec16
Compare
Add generic Linux makefiles with default compilation recipes and flags. They cover the following use cases:
single.mk
);multiple.mk
).For other use cases, use
linux.mk
and create a custom makefile.The makefiles are based on those used in the "Hardware-Software Interface" course, which were added here: systems-cs-pub-ro/iocla#89.