mirror of
https://github.com/farisawan-2000/kirby64.git
synced 2024-11-23 13:20:03 +00:00
22 lines
490 B
Makefile
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))))
|