mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 09:25:44 +01:00
edit makefile to remove redundant flags, and make clean task more conditional
This commit is contained in:
10
makefile
10
makefile
@@ -9,15 +9,13 @@ VERSION = 0.0.0
|
|||||||
DEBUG ?= 0
|
DEBUG ?= 0
|
||||||
CC ?= cc
|
CC ?= cc
|
||||||
LD ?= ld
|
LD ?= ld
|
||||||
CFLAGS += -c -std=gnu99 -Wall -MMD -MP
|
|
||||||
CFLAGS += -Ilib/glad/include
|
|
||||||
LDFLAGS += -flto -lm
|
LDFLAGS += -flto -lm
|
||||||
MARCH ?= $(shell uname -m)
|
MARCH ?= $(shell uname -m)
|
||||||
KERNEL ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
KERNEL ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
# compilation flags
|
# compilation flags
|
||||||
CFLAGS = -c -std=gnu99 -Wall -Wextra -Wpedantic -MMD -MP
|
CFLAGS += -c -std=gnu99 -Wall -Wextra -Wpedantic -MMD -MP
|
||||||
LDFLAGS = -flto
|
LDFLAGS += -flto
|
||||||
|
|
||||||
# architecture/OS detection
|
# architecture/OS detection
|
||||||
ifeq ($(KERNEL),)
|
ifeq ($(KERNEL),)
|
||||||
@@ -81,8 +79,8 @@ compile: $(BIN)
|
|||||||
|
|
||||||
.PHONY .NOTPARALLEL:
|
.PHONY .NOTPARALLEL:
|
||||||
clean:
|
clean:
|
||||||
@rm -rv obj/
|
@[ -d obj/ ] && rm -rv obj/ || true
|
||||||
@rm -rv bin/
|
@[ -d bin/ ] && rm -rv bin/ || true
|
||||||
|
|
||||||
$(BIN): $(OBJ)
|
$(BIN): $(OBJ)
|
||||||
$(info [CC/LD] $@)
|
$(info [CC/LD] $@)
|
||||||
|
|||||||
Reference in New Issue
Block a user