kirby64/tools/Makefile
farisawan-2000 56eba11cc2 added files
2020-05-23 06:09:52 -04:00

22 lines
490 B
Makefile

CC := gcc
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O3 -s
PROGRAMS := iplfontutil n64graphics
iplfontutil_SOURCES := iplfontutil.c
iplfontutil_CFLAGS := -O2 # faster compile time
n64graphics_SOURCES := n64graphics.c utils.c
n64graphics_CFLAGS := -DN64GRAPHICS_STANDALONE
all: $(PROGRAMS)
clean:
$(RM) $(PROGRAMS)
define COMPILE
$(1): $($1_SOURCES)
$(CC) $(CFLAGS) $$^ -lm -o $$@ $($1_CFLAGS)
endef
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))