forked from rvega/Fan-Control-Daemon
-
Notifications
You must be signed in to change notification settings - Fork 140
Makefile cleanup, C improvements, new distros, clean up my .git #104
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modified: AUTHORS Updated personal info. modified: Makefile Beginning work to clean up Makefile. The original makefile appeared to be checking if the system was Windows NT. Since this is for GNU/ Linux, that was removed. Also all of the code is C, but the Makefile was calling the C++ compiler to hide bool issues and missing typedefs (which C++ is ok with but C is not). modified: src/daemon.c Added structs, added stdbool.h modified: src/main.c Added stdbool.h modified: src/mbpfan.c Added stdbool.h modified: src/minunit.c Added stdbool.h
modified: README.md Changed instructions for how to use Clang. It is much easier since the Makefile now just uses the system's compiler, and correctly uses C instead of C++
I did some more Makefile cleanup today, and tested on Clang 4.0 along with using the new LLVM linker lld. |
dgraziotin
added a commit
that referenced
this pull request
Apr 2, 2017
I'm terribly slow, but I get the job done :-) thank you again for the PR, much appreciated. I reverted to the old legacy kernel detection because I want to test it a little bit. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey Daniel,
Sorry for another/different pull request, I closed the last one. I was using multiple .git environments on my different test machines and it was creating noisy commits with old contact info stored in different scripts. Also, I wanted to update some added new distros to README.
(from the previous pull request, the last line is different now...)
Where we left off I was able to get mbpfan to compile under clang by
adding the missing return to the function in minunit.c. Our next goal
was to clean up the Makefile so you didn't have to edit it to use a
different compiler, and also clean it up since it was using a C++
compiler when all the code is C.
I think I figured out why it was using a C++ compiler. First the old C
standard didn't support boolean data types. The new standard does
but you have to include stdbool.h. So that was added to the
appropriate .c files. Second, C needs an explicit type def, and daemon.c
did not have that, so the appropriate structs were added.
Finally the Windows NT stuff was removed from the Makefile, and I have
updated my personal information.
The Makefile still needs work before it is pretty, but it works in GCC and Clang compilers. It is tested and working on the previously used distros of Debian 8, Ubuntu 16.04 and 16.10, Fedora 25 and CentOS 7.3.
!NEW! distros added/tested Trisquel 7 (trisquel.info) and Alpine Linux 3.5.2 (alpinelinux.org). This was built using Alpine Linux's musl C library.