mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-23 06:54:14 -04:00
26c8cdd221
* git subrepo clone git@github.com:EllipticEllipsis/fado.git tools/fado subrepo: subdir: "tools/fado" merged: "d202857b" upstream: origin: "git@github.com:EllipticEllipsis/fado.git" branch: "master" commit: "d202857b" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Makefile adjustments and additions to build fado * git subrepo pull --force tools/fado subrepo: subdir: "tools/fado" merged: "46c4d751" upstream: origin: "git@github.com:EllipticEllipsis/fado.git" branch: "master" commit: "46c4d751" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo pull --force tools/fado subrepo: subdir: "tools/fado" merged: "88114ebc" upstream: origin: "git@github.com:EllipticEllipsis/fado.git" branch: "master" commit: "88114ebc" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Fix typo in makefile * Fix it, maybe? * git subrepo pull tools/fado subrepo: subdir: "tools/fado" merged: "f7efb10a9" upstream: origin: "git@github.com:EllipticEllipsis/fado.git" branch: "master" commit: "f7efb10a9" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Update build tools
37 lines
798 B
Makefile
37 lines
798 B
Makefile
CC := gcc
|
|
CFLAGS := -Wall -Wextra -pedantic -std=c99 -g -O2
|
|
PROGRAMS := elf2rom makeromfs mkldscript reloc_prereq yaz0
|
|
|
|
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)
|
|
|
|
clean:
|
|
$(RM) $(PROGRAMS)
|
|
|
|
elf2rom_SOURCES := elf2rom.c elf32.c n64chksum.c util.c
|
|
makeromfs_SOURCES := makeromfs.c n64chksum.c util.c
|
|
mkldscript_SOURCES := mkldscript.c spec.c util.c
|
|
reloc_prereq_SOURCES := reloc_prereq.c spec.c util.c
|
|
yaz0_SOURCES := yaz0tool.c yaz0.c util.c
|
|
|
|
define COMPILE =
|
|
$(1): $($1_SOURCES)
|
|
$(CC) $(CFLAGS) $$^ -o $$@
|
|
endef
|
|
|
|
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
|