mirror of
https://github.com/thepigeongenerator/mcaselector-lite
synced 2026-02-08 07:33:35 +01:00
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:
7
.gitmodules
vendored
7
.gitmodules
vendored
@@ -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
|
|
||||||
17
Makefile
17
Makefile
@@ -20,10 +20,19 @@ DEP := $(addsuffix .d,$(SRC))
|
|||||||
CFLAGS := -O2 $(CFLAGS) -g -std=gnu99\
|
CFLAGS := -O2 $(CFLAGS) -g -std=gnu99\
|
||||||
-Wall -Wextra -Wpedantic -Wno-pointer-arith
|
-Wall -Wextra -Wpedantic -Wno-pointer-arith
|
||||||
CPPFLAGS := -DNDEBUG $(CPPFLAGS) -DGLFW_INCLUDE_NONE\
|
CPPFLAGS := -DNDEBUG $(CPPFLAGS) -DGLFW_INCLUDE_NONE\
|
||||||
-Iinclude -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/libarchive
|
-Iinclude -Ilib/glad/include
|
||||||
LDFLAGS := -flto $(LDFLAGS)\
|
LDFLAGS := -flto $(LDFLAGS)
|
||||||
-Llib/obj/glfw/src -Llib/obj/libarchive/libarchive
|
LDLIBS := $(LDLIBS) -lm
|
||||||
LDLIBS := $(LDLIBS) -lglfw3 -larchive -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-cc = $(info [CC] $(1))
|
||||||
msg-clean = $(info [CLEAN] $(1))
|
msg-clean = $(info [CLEAN] $(1))
|
||||||
|
|||||||
1
lib/glfw
1
lib/glfw
Submodule lib/glfw deleted from 7b6aead9fb
Submodule lib/libarchive deleted from 9525f90ca4
Reference in New Issue
Block a user