1
0
Fork 0
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:
louist103 2021-10-31 15:00:24 -04:00 committed by GitHub
parent bf0f26db9b
commit 916efa0f7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View file

@ -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)