1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 11:40:38 +00:00
Commit graph

19 commits

Author SHA1 Message Date
Matthew Kilgore d36edad30c Fix compilation of files with $ in the name
This is a bit of an odd one, but files with $ in the name don't compile
correctly due to expansion being done on the $.

The culprit here is `make`, as the syntax '$x' is interpreted to mean to
insert the expansion of the variable 'x'. To avoid this behavior we have
to replace every single $ with $$. Make will interpret the $$ to mean it
should insert a single $ and not do any expansion, which is what we
want.

Fixes: #96
2022-06-10 10:42:49 -04:00
Matthew Kilgore 2d919768ac Add C++ compiler settings dialog
The new dialogs includes 5 settings:

1. Flag to turn on Optimization (off by default)
2. Flag to strip symbols (On by default)
3. String for extra compiler flags
4. String for extra linker flags
5. Setting for max compiler processes (default of 3)

Fixes: #65
Fixes: #40
2022-05-30 23:15:04 -04:00
Matthew Kilgore 142f1d3615 Makefile should respect CXXFLAGS_EXTRA
The Makefile has an issue where it doesn't respect CXXFLAGS_EXTRA due to
directly setting CXXFLAGS to a new value after adding the extra flags.
2022-05-30 23:15:04 -04:00
Matthew Kilgore 9e2177deff Allow EXE name to have spaces in it
Makefile's generally hate spaces in filenames, and it's largely
impossible to make them work. Due to that, with the change to use a
`Makefile` the `EXE=` parameter did not work with spaces, and programs
such as "foo bar.bas" would not compile because it produces "foo
bar.exe" which has a space in the name.

There were options here, but in this very specific case it is actually
possible to allow the Makefile to work with spaces. `EXE` is only a
single filename, so as long as we always quote it correctly and the
provided `EXE=` parameter escapes the spaces with `\` then it will work.

Thus, we modified the Makefile to always do the quoting, and modified
QB64 to automatically escape the spaces in the executable name provided
to the Makefile.

I also modified the `compile_tests` to test that spaces in filenames and
paths of the executable correctly compile.

Fixes: #80
2022-05-22 23:59:06 -04:00
Matthew Kilgore c05ba9cedc Don't include the directory in symbol file name
The symbol file was intended to just make the executable name with
".sym" and be located in ./internal/temp. Unfortunately I forgot to
remove the directory from the EXE name, so it ended up producing an
incorrect filename for the ".sym" file.

Make already provide a `notdir` function, so we can use that to get just
the executable name.
2022-05-22 23:59:06 -04:00
Matthew Kilgore 493eccf370 Fix the dependency list of qbx.o to use TEMP_ID
The contents of the qbx.o being compiled is dependent on the contents of
./internal/temp* related to that qbx.o. The paticular ./internal/temp*
to use is controled by TEMP_ID.

Unfortunately TEMP_ID is omitted from the path used to generate the
dependency list, which means the `qbx.o` may not get recompiled when
code changes are made and multiple IDE instances are being used.

Fixes: #81
2022-05-22 23:58:54 -04:00
Matthew Kilgore 6adac0842e Remove unnecessary else logic from Makefile 2022-05-16 00:16:18 -04:00
Matthew Kilgore 790129dcef Skip the symbol stripping on OSX
The `objcopy` logic to produce a symbol file doesn't work on OSX, and it
seems it needs different lgoic to produce debug information, so for now
we're just going to skip it.
2022-05-15 17:13:10 -04:00
Matthew Kilgore b5ea3a081d Fix BUILD_QB64=y usage on Windows
BUILD_QB64=y sets the default EXE name to 'qb64', which is actually
wrong on Windows because it does not include the `.exe` extention. It
also works anyway but `objcopy` doesn't recognize the file without the
extension present.
2022-05-15 17:12:17 -04:00
Matthew Kilgore f399406f8f Produce a symbol file along with the executable
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: #53
2022-05-14 15:06:56 -04:00
Matthew Kilgore 7a5ca0c49c Cleanup unused Makefile stuff 2022-05-14 12:13:00 -04:00
Matthew Kilgore 336a7c3085 Build QB64 with icon 2022-05-12 00:34:48 -04:00
Matthew Kilgore fd6a201046 Require OS to be set when using the Makefile 2022-05-12 00:21:02 -04:00
Matthew Kilgore 10d12eddb8 Reorganize, add CFLAGS_EXTRA 2022-05-12 00:21:02 -04:00
Matthew Kilgore f1d9063980 Add support for CXXFLAGS_EXTRA and CXXLIBS_EXTRA 2022-05-12 00:21:02 -04:00
Matthew Kilgore bc7df798c3 make clean should clear ./internal/temp 2022-05-12 00:21:02 -04:00
Matthew Kilgore 23ef0aeca8 Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
Matthew Kilgore 2a4b637412 Separate _ICON usage from icon.rc
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.
2022-05-12 00:21:02 -04:00
Matthew Kilgore c1639b3979 Add basic make build system 2022-05-12 00:21:02 -04:00