mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-18 20:35:45 +01:00
add library compilation to makefile
This commit is contained in:
11
makefile
11
makefile
@@ -11,9 +11,7 @@ LD ?= ld
|
|||||||
|
|
||||||
# compilation flags
|
# compilation flags
|
||||||
CFLAGS = -c -std=gnu99 -Wall -Wextra -Wpedantic -MMD -MP
|
CFLAGS = -c -std=gnu99 -Wall -Wextra -Wpedantic -MMD -MP
|
||||||
CFLAGS += -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/include
|
LDFLAGS = -flto
|
||||||
LDFLAGS = -flto -lm
|
|
||||||
LDFLAGS += lib/glfw/src/libglfw3.a
|
|
||||||
|
|
||||||
# architecture/OS detection
|
# architecture/OS detection
|
||||||
ifeq ($(KERNEL),)
|
ifeq ($(KERNEL),)
|
||||||
@@ -49,8 +47,11 @@ PROF = rel
|
|||||||
CFLAGS += -DNDEBUG -O2
|
CFLAGS += -DNDEBUG -O2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -Ilib/glad/include -Ilib/glfw/include -Ilib/libarchive/include
|
||||||
|
LDFLAGS += -lc -lm lib/glad/gl.o lib/glfw/src/libglfw3.a
|
||||||
|
|
||||||
# get source files
|
# get source files
|
||||||
SRC := $(wildcard src/**/*.c)
|
SRC := $(wildcard src/*.c) $(wildcard src/**/*.c)
|
||||||
RES := $(wildcard res/*.glsl)
|
RES := $(wildcard res/*.glsl)
|
||||||
ifeq ($(DEBUG),test)
|
ifeq ($(DEBUG),test)
|
||||||
SRC := $(filter-out src/main.c, $(SRC)) $(wildcard test/**/*.c)
|
SRC := $(filter-out src/main.c, $(SRC)) $(wildcard test/**/*.c)
|
||||||
@@ -74,6 +75,8 @@ compile: $(BIN)
|
|||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
libs:
|
libs:
|
||||||
|
@cd lib/glfw && cmake . && $(MAKE)
|
||||||
|
@cd lib/glad && $(CC) -c -Iinclude src/gl.c
|
||||||
|
|
||||||
.PHONY .NOTPARALLEL:
|
.PHONY .NOTPARALLEL:
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user