Compare commits

..

3 Commits

Author SHA1 Message Date
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

View File

@@ -24,7 +24,7 @@ LDFLAGS += -fsanitize=address -ftrapv
endif
CPPFLAGS += -Iinclude -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/libarchive
LDFLAGS += -Llib/obj/glfw/src -Llib/obj/libarchive/libarchive
LDLIBS += -lm -lglfw -larchive
LDLIBS += -lm -lglfw3 -larchive
# detect if we're compiling on Windows, meaning
# a lot of things considered "standard" are unavailable.
@@ -38,7 +38,7 @@ endif
# find all the source files using wildcards
# NOTE: MS-DOS and MS-Windows uses backslash `\`, this might break.
RES := $(wildcard res/*)
SRC := $(wildcard src/*.c src/*/*.c src/*/*/*.c src/*/*/*/*.c src/*/*/*/*/*.c src/*/*/*/*/*/*.c src/*/*/*/*/*/*/*.c src/*/*/*/*/*/*/*/*.c) lib/glad/gl.c
SRC := $(wildcard src/*.c src/*/*.c src/*/*/*.c src/*/*/*/*.c src/*/*/*/*/*.c src/*/*/*/*/*/*.c src/*/*/*/*/*/*/*.c src/*/*/*/*/*/*/*/*.c) lib/glad/src/gl.c
OBJ := $(SRC:%.c=obj/%.o) $(RES:%=obj/%.o)
TSRC := $(wildcard test/*.c test/*/*.c test/*/*/*.c test/*/*/*/*.c test/*/*/*/*/*.c test/*/*/*/*/*/*.c test/*/*/*/*/*/*/*.c test/*/*/*/*/*/*/*/*.c)
TOBJ := $(TSRC:%.c=obj/%.o)
@@ -74,6 +74,7 @@ bin/TEST_$(NAME): $(TOBJ) $(filter-out main.o,$(OBJ))
obj/res/%.o: res/%
$(info [LD] $@)
@mkdir -p $(@D)
@$(LD) -r -b binary -o $@ $<
obj/%.o: %.c