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.
This commit is contained in:
2026-01-21 15:57:22 +01:00
parent 2192acbc9d
commit cf79f7fdc8
4 changed files with 13 additions and 13 deletions

7
.gitmodules vendored
View File

@@ -1,7 +0,0 @@
[submodule "lib/glfw"]
path = lib/glfw
url = https://github.com/glfw/glfw
[submodule "lib/libarchive"]
path = lib/libarchive
url = https://github.com/libarchive/libarchive

View File

@@ -20,10 +20,19 @@ DEP := $(addsuffix .d,$(SRC))
CFLAGS := -O2 $(CFLAGS) -g -std=gnu99\
-Wall -Wextra -Wpedantic -Wno-pointer-arith
CPPFLAGS := -DNDEBUG $(CPPFLAGS) -DGLFW_INCLUDE_NONE\
-Iinclude -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/libarchive
LDFLAGS := -flto $(LDFLAGS)\
-Llib/obj/glfw/src -Llib/obj/libarchive/libarchive
LDLIBS := $(LDLIBS) -lglfw3 -larchive -lm
-Iinclude -Ilib/glad/include
LDFLAGS := -flto $(LDFLAGS)
LDLIBS := $(LDLIBS) -lm
# Use pkg-config to locate dependencies, and set the correct flags.
ifeq (,$(shell command -v pkg-config))
$(error Failed to locate pkg-config, please make sure it is installed or acessible through PATH.)
else
CPPFLAGS += $(shell pkg-config --cflags-only-I glfw3 libarchive)
LDFLAGS += $(shell pkg-config --libs-only-L glfw3 libarchive)
LDLIBS += $(shell pkg-config --libs-only-l glfw3 libarchive)
endif
msg-cc = $(info [CC] $(1))
msg-clean = $(info [CLEAN] $(1))

Submodule lib/glfw deleted from 7b6aead9fb

Submodule lib/libarchive deleted from 9525f90ca4