-
Notifications
You must be signed in to change notification settings - Fork 23
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
Replace existing build system with make #51
Replace existing build system with make #51
Conversation
Makefile does this
The purpose of moving the EXEs is so that they are not captured in the build artifacts. They would be nice to have, but they end up being a few hundred MBs in size so much too large to bother saving.
The Makefile was incorrectly tying together _ICON and icon.rc, making it impossible to use one without the other. To fix this we introduce a new DEP_ICON_RC flag, which indicates we need to use the icon.rc file (in addition to regular icon support). DEP_ICON now only indicates we need to support _ICON, and does not attempt to build the resource information.
The GitHub runners do not have any sound cards available. We could potentially install a dummy one but that's a bit too much work right now.
internal/c/libqb/build.mk
Outdated
@@ -0,0 +1,10 @@ | |||
|
|||
QB_LIBQB_SETUP_OBJS := $(PATH_INTERNAL_C)/libqb.o | |||
|
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 realized after looking it over that this file isn't actually getting used. I will be using this file in upcoming changes to work on splitting apart libqb
but I'll remove it from this PR.
# | ||
# This is important for libraries, since they could potentially be referencing | ||
# things from our dependencies | ||
CXXFLAGS += $(CXXFLAGS_EXTRA) |
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.
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.
Nothing glaringly obvious stands out to me as being off here. I think you're good to go, when you feel ready to pull and merge. ;)
We'll turn this on later when we have it better sorted out.
The symbol file is a file that aids in debugging by allowing a crash dump from a stripped executable to have it's symbols applied to it. The file itself ends up in ./internal/temp after compilation and is called `EXEFILE.sym`. FIxes: QB64-Phoenix-Edition#53
On Windows we don't distribute the ./setup_win.bat, so the contents of ./internal/source are not actually relevant for them. Since the QB64 symbol file will be located in it though, it is important that they get an updated copy. It does also just make basic sense that if we're distributing an ./internal/source with the Windows version it should match whatever QB64 it was shipped with.
This replaces all of the various existing scripts and compile lines with a single
Makefile
. This has a few big benefits:g++
lines that are slightly different from each other, and that along with ones in qb64.bas makes it very hard to handle any kind of build changes.BUILD_QB64=y
to make.make
can be used to easily compile separate source files and link them all together in the end without us having to do much work.Obviously this is a fairly large change. I add a fair amount more testing to verify this change does work - I have tests for every different optional dependency, along with
DATA
,$EXEICON
,$CONSOLE:ONLY
and some others. The biggest potential question mark is weirdDECLARE LIBRARY
usages that I wasn't able to make tests for (I may have gotten them all, but it's somewhat poorly documented so I'm not so sure.For the moment I'm going to leave this PR as a draft and ask some on the forum to give this a test as a bit of a sanity check. Please give the PR a look when you have time :)
Closes: #33
Edit: Note that due to
./internal/source
still housing a QB64 that uses all the existing build scripts, they can't be removed in this PR. It doesn't matter that much though as themake
logic doesn't care if they are still there, and I'll submit a separate PR after this one to remove all those scripts after./internal/source
is updated to usemake
.