Compare commits

...

3 Commits

Author SHA1 Message Date
f5450232b4 fix: testing compilation does not correctly filter out main.o 2025-09-15 09:56:08 +02:00
9f7d1fb57c 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 09:55:48 +02:00
2186ec2942 forcibly recompile the libs, so if deps get updated, this will be carried through.
This sacrifices a bit of workflow performance, but won't be too
significant. The heaviest step (cmake) is still circumvented
2025-09-15 09:40:31 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -32,6 +32,6 @@ jobs:
path: lib/obj/ path: lib/obj/
key: ${{runner.os}}-lib/obj-${{github.sha}} key: ${{runner.os}}-lib/obj-${{github.sha}}
restore-keys: ${{runner.os}}-lib/obj- restore-keys: ${{runner.os}}-lib/obj-
- run: make -j libs - run: make -j libs -B
- run: make -j all - run: make -j all
- run: make -j test - run: make -j test

View File

@@ -24,7 +24,7 @@ LDFLAGS += -fsanitize=address -ftrapv
endif endif
CPPFLAGS += -Iinclude -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/libarchive CPPFLAGS += -Iinclude -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/libarchive
LDFLAGS += -Llib/obj/glfw/src -Llib/obj/libarchive/libarchive LDFLAGS += -Llib/obj/glfw/src -Llib/obj/libarchive/libarchive
LDLIBS += -lm -lglfw3 -larchive LDLIBS += -lglfw3 -larchive -lm
# detect if we're compiling on Windows, meaning # detect if we're compiling on Windows, meaning
# a lot of things considered "standard" are unavailable. # a lot of things considered "standard" are unavailable.
@@ -67,7 +67,7 @@ bin/$(NAME): $(OBJ)
@$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) @$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
# link together a testing binary # link together a testing binary
bin/TEST_$(NAME): $(TOBJ) $(filter-out main.o,$(OBJ)) bin/TEST_$(NAME): $(TOBJ) $(filter-out obj/src/main.o,$(OBJ))
$(info [CC/LD] $@) $(info [CC/LD] $@)
@mkdir -p $(@D) @mkdir -p $(@D)
@$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) @$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)