Commit Graph

43 Commits

Author SHA1 Message Date
d4e281a477 fix: makefile .PHONY directives were non-functional
It appears that .PHONY, and all other special built-in target names
should only be defined once, and should not be used as a "tag", as I
have done here.
2026-02-05 15:46:03 +01:00
8a01cd3a47 Update files' copyright headers (final time, promice)
This should be the end of the identity crisis with files' copyright
headers/disclosures.
We shall not be using names in the headers, since this does not make
sense, this is covered by the git logs, and is preferred.

The following commit will tackle the CONTRIBUTORS file, to specify how
it should be generated.
2026-02-05 12:15:48 +01:00
9a96134872 Add a warning for variable length arrays 2026-02-02 11:32:27 +01:00
11a5e8dc4a Switch over to GNU17 C standard.
The main decision is due to GNU17 being more "modern", and more
accurately reflecting practices of today.
2026-02-02 11:28:26 +01:00
455072f0e7 fix: not using NAME for install and install-strip prerequisites 2026-01-25 09:40:14 +01:00
5db8156824 Include cflags in sprase invoke 2026-01-23 12:27:00 +01:00
a73e03be50 Allow for customising makefile behaviour consistently. 2026-01-22 17:37:40 +01:00
ebcd150415 Delete all rendering / graphics code.
Whilst it was fun to experiment with OpenGL, I do not see myself
maintaining a codebase using that, when all I do is draw bloody pixels
to a buffer.
Thus begins the search for a... more suitable graphical framework.
2026-01-22 16:02:25 +01:00
401d7acc69 fix: Sparse executing one-by-one is more of an issue than a help.
This causes the makefile to stop execution as soon as sparse fails,
hiding errors in any other file.
2026-01-22 15:36:02 +01:00
4679d6bbc5 clean makefile 2026-01-22 12:54:43 +01:00
bfc108bd78 Write install, install-strip, and uninstall targets. 2026-01-22 12:53:08 +01:00
7ef3d16b53 Use NAME instead of hard-coding the name.
Windows NT systems use the `.exe` extension, and thus binary name cannot
be hard-coded.
2026-01-22 12:52:47 +01:00
a4a0b2e845 Add check recipe, which checks the code using sparse. 2026-01-22 12:25:39 +01:00
cf79f7fdc8 Use native packages over included submodules.
This is the best option out of all, since it removes the requirement of
manually managing the dependencies, and should not matter for stable
ABI.
2026-01-21 15:57:22 +01:00
2192acbc9d fix: Second LDFLAGS not used. Replace variable appending with escaping.
This reduces the probability for this happening in the future, and
improve overall clairity.
2026-01-21 11:02:17 +01:00
1b1e906015 Rework Makefile, to be more robust, reliable and minimal.
- Improved logic for overriding compiler flags.
- Made tooling and logging more robust.
- Added functionality to disable "silent mode" by listening to
`--no-silent`
- Removed OSX/Darwin build support (for now)
- No longer utilising /obj directory, but instead just building files
right in the worktree.
- Generating dependency files seperately from general code, for
clairity.
2026-01-15 21:23:34 +01:00
40c1fd7dc4 fix: GNU Make predefines variables, and ?= will not behave as expected. 2025-12-22 14:22:37 +01:00
3a2041194c switch to GPL-2.0-only licence 2025-12-18 17:42:00 +01:00
8d0e825157 rewrite copyright file header to provide more information about where the file is from. 2025-11-13 22:24:09 +01:00
5f909d1d65 rework the flow of the Makefile. 2025-10-23 15:28:42 +02:00
87541d5789 modify Makefile to be more in-line with the GNU standard.
Mainly so the makefile is a bit less esoteric to use, debugging flags
must be specified manually.

changed:
- `$RM` for calling `rm`
- removed unused `$ISWIN`
- renamed `test` to `check`
- added `install` and `install-strip` recipes, which for now remain
empty
- added `-g` to `$CFLAGS`, since it helps debugging, and in case of
failures makes bug report less of a headache.

I decided to not modify it further so "specialised tools" don't need to
store files in the git repo, which seemed to complicate logic.
This is the same reason to why I chose to not adapt clean in a way to
introduce `mostlyclean`.
2025-10-20 15:19:24 +02:00
079361771f fix-test: windows compilation; append some extra libraries when compiling windows. 2025-09-17 13:44:34 +02:00
e9c922d3cd revert forced usage of bash, instead opt for (more) explicit compiler selection. 2025-09-17 12:39:21 +02:00
d46f8c0900 always use bash as the shell. 2025-09-17 12:13:46 +02:00
88d39150dd test-fix: macosx compilation 2025-09-17 11:32:40 +02:00
11c8748262 define GLFW_INCLUDE_NONE, so glfw knows we're using custom headers. 2025-09-15 13:51:36 +02:00
15b5430611 Instead of using cmake, I *obviously* need to use cmake -G 'Unix Makefiles'. How silly of me.
MicroSoft Windows: "it just works"
2025-09-15 12:30:01 +02:00
82ebe1f4d1 fix: use CC instead of LD, and deprecate LD
this is a bit confusing, since setting `LD=cc` would have the same
issue; `ld: -f may not be used without -shared`. So I've got no idea
what is going wrong, I guess it's something funky.
This works, so we shall stick with this.
2025-09-15 12:08:39 +02:00
158a7f8383 fix: don't use UNIX sh based ifs, instead opt for GNU Make.
This is more portable acorss machines
2025-09-15 12:04:41 +02:00
c32d1551c8 fix: regular xxd does not have -n, thus using some argument manipulation magic
On my main system I use `tinyxxd`, henceforth: "regular"
2025-09-15 12:04:41 +02:00
f20171c0d7 fix: using the linker for generating a .o file is a feature for only GNU ld.
Now utilising a process to generate a .c file using `xxd`, and compiling
those to object files.
2025-09-15 11:59:39 +02:00
3a7709c392 fix: use more accurate linker flags / calling. 2025-09-15 11:59:39 +02:00
a14ef55262 fix: testing compilation does not correctly filter out main.o 2025-09-15 11:14:41 +02:00
d340bbe40b fix: fminf and other <math.h> from libm not found.
The `-lm` linker flag was applied preceding the libraries, but it
should've been succeding.
2025-09-15 11:14:41 +02:00
348c4e484c fix: clean-libs can fail when it shouldn't 2025-09-13 21:44:46 +02:00
1140bd97bf fix: linking library glfw, whilst the library compilation produces libglfw3.
This slight discrepancy is a tad annoying, since it doesn't work
backwards so it uses my system's version. But we'll figure something for
that out later... probably.
2025-09-13 21:32:33 +02:00
997b15c640 fix: obj/res/ path did not create a directory, so likely failed to place anything there. 2025-09-13 21:17:07 +02:00
f481af7e78 fix: incorrect gl.c path 2025-09-13 21:16:33 +02:00
75ebff9071 remove pointer arithmatic warnings, since they are just useful 2025-09-13 21:11:38 +02:00
c2e1b67b4c seperate out library compilation from general compilation
This can help with a more nuanced compilation. (eg. use system libraries
rather than compile our own)
Furthermore, it decreases the needed compilation time, since we needn't
recompile the whole thing when having cleaned out our local sources.
2025-09-13 20:25:38 +02:00
667814fb72 rework makefile to put extera emphasis on us no longer performing cross-platform compilation
Furthermore, we removed a bunch of behaviour that wasn't needed, and
simplified the bunch.
2025-09-13 20:25:38 +02:00
23fda298e6 fix: makefile had some duplicate configurations 2025-09-11 23:28:58 +02:00
03c76b0be6 rename makefile to Makefile, to reflect how everyone seems to name their makefile.
it just makes sense, and I might as well do it like this to prevent
confusing people.
2025-09-11 23:28:58 +02:00