8000 major build cleanups, minor library cleanups by nicholatian · Pull Request #3 · RealAlpha/discord-c · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

major build cleanups, minor library cleanups #3

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nicholatian
Copy link

The Makefile now uses proper recipe syntax (a la %.c and $(OFILES)) to support parallel building with make -j$(nproc). I also fixed OpenSSL include directories on macOS, as Homebrew provides those as keg-only. Added a phony targe 8000 t for clang-format-based autoformatting. Make will now pass along NDEBUG to the CPP to control for debug or release building. There is also now a single Makefile that builds the library and its test suite.

The README is a lot more concise now, and it lists all of the library’s dependencies. I got some work done fixing up the headers to (eventually) be ANSI C compatible, with the goal of bringing the whole library to C89 standards compliance. Let me know what you think.

uses proper recipe syntaxes to support parallel building, fixes include directories on macOS, add phony target for .clang-formatting, provide NDEBUG flagging, make general build recipes reusable, use variable-clad commands $(RM) and such
remove odd orgmode-style build instructions, resummarised in a new section
@RealAlpha
Copy link
Owner

Hi nicholatian,

Thanks for submitting this PR! My apologies for the delay in getting back to you. I pulled your code, and it appears that the new version of the Makefile works fine for building the library, but does not build the test/main.c file properly (makefile target "test").

It appears to not be including the library's header file (main.c:1:10: fatal error: 'discord-c.h' file not found), and when changing that to "lib/discord-c.h", it gave me linking/library errors. Looking at your makefile it doesn't appear to be linking to those header paths/library files? My apologies if this is just an issue on my end (I'm running MacOS 10.15, built using the latest version of XCode installed from a terminal environment; used brew to install dependancies, which appears to be the correct setup as the library builds just fine).

If you'd be able to investigate the test program issue that'd be great, and my gratitude for submitting this PR! Let me know if you need any more information from me.

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
0