mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-10 19:20:13 +00:00
Use clang when possible for tools (#990)
* Use clang when possible for tools * Add LLD ?= 0
This commit is contained in:
parent
bf0f26db9b
commit
916efa0f7d
2 changed files with 17 additions and 3 deletions
|
@ -1,7 +1,21 @@
|
|||
CC := gcc
|
||||
CFLAGS := -Wall -Wextra -pedantic -std=c99 -g -O2
|
||||
PROGRAMS := yaz0 makeromfs elf2rom mkldscript vtxdis
|
||||
ZAPD := ZAPD/ZAPD.out
|
||||
|
||||
ifeq ($(shell command -v clang >/dev/null 2>&1; echo $$?),0)
|
||||
CC := clang
|
||||
else
|
||||
CC := gcc
|
||||
endif
|
||||
|
||||
LLD ?= 0
|
||||
|
||||
ifeq ($(shell command -v ld.lld >/dev/null 2>&1; echo $$?),0)
|
||||
LLD := 1
|
||||
endif
|
||||
|
||||
ifneq ($(LLD),0)
|
||||
CFLAGS += -fuse-ld=lld
|
||||
endif
|
||||
|
||||
all: $(PROGRAMS)
|
||||
cd ZAPD && $(MAKE)
|
||||
|
|
Loading…
Reference in a new issue