1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 17:54:15 +00:00
oot/tools/Makefile
Anghelo Carvajal 867b5a87ba
Add distclean rule to makefile (#716)
* Add clean_everything rule to makefile

Signed-off-by: angie <angheloalf95@gmail.com>

* change `clean_everything` to `distclean`

Signed-off-by: angie <angheloalf95@gmail.com>

* Somehow forgot to commit the makefile

Signed-off-by: angie <angheloalf95@gmail.com>

* Remove nuke

Signed-off-by: angie <angheloalf95@gmail.com>

* Remove redundant variables

Signed-off-by: angie <angheloalf95@gmail.com>

* Forgot to remove `TEXTURE_DIRS`

Signed-off-by: angie <angheloalf95@gmail.com>
2021-03-14 12:07:46 -04:00

33 lines
752 B
Makefile

CC := gcc
CFLAGS := -Wall -Wextra -pedantic -std=c99 -g -O2
PROGRAMS := yaz0 makeromfs elf2rom mkldscript vtxdis
ZAPD := ZAPD/ZAPD.out
all: $(PROGRAMS)
cd ZAPD && $(MAKE)
clean:
$(RM) $(PROGRAMS) $(addsuffix .exe,$(PROGRAMS))
$(RM) ZAPD/ZAPD.out
# Need to clean the above line later...
distclean: clean
$(MAKE) -C ZAPD clean
.PHONY: all clean distclean
mkldscript_SOURCES := mkldscript.c util.c
elf2rom_SOURCES := elf2rom.c elf32.c n64chksum.c util.c
yaz0_SOURCES := yaz0tool.c yaz0.c util.c
makeromfs_SOURCES := makeromfs.c n64chksum.c util.c
vtxdis_SOURCES := vtxdis.c
#$(ZAPD):
# cd ZAPD && $(MAKE)
define COMPILE =
$(1): $($1_SOURCES)
$(CC) $(CFLAGS) $$^ -o $$@
endef
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))