mirror of
https://github.com/farisawan-2000/kirby64.git
synced 2024-11-23 13:20:03 +00:00
46 lines
1.2 KiB
Makefile
46 lines
1.2 KiB
Makefile
CC := gcc
|
|
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -O3 -s
|
|
PROGRAMS := iplfontutil n64graphics n64crc patch_libultra_math gfxdis_f3dex2 extract_assets
|
|
|
|
iplfontutil_SOURCES := iplfontutil.c
|
|
iplfontutil_CFLAGS := -O2 # faster compile time
|
|
|
|
gfxdis_f3dex2_SOURCES := gfxdis/gfxdis.c gfxdis/main.c
|
|
gfxdis_f3dex2_CFLAGS := -DF3DEX_GBI_2 -Igfxdis/include/ -Igfxdis/ -O2 -std=gnu99 -Wno-pedantic
|
|
|
|
n64crc_SOURCES := n64crc.c
|
|
n64crc_CFLAGS := -O2 # faster compile time
|
|
|
|
n64graphics_SOURCES := n64graphics.c utils.c
|
|
n64graphics_CFLAGS := -DN64GRAPHICS_STANDALONE
|
|
|
|
extract_assets_SOURCES := extract_assets.c
|
|
extract_assets_CFLAGS := -fopenmp
|
|
|
|
patch_libultra_math_SOURCES := patch_libultra_math.c
|
|
|
|
# who cares if you have armips, just use our version
|
|
# ifeq (, $(shell which armips 2> /dev/null))
|
|
CXX_PROGRAMS := armips
|
|
# endif
|
|
|
|
default: all
|
|
|
|
all: $(PROGRAMS) $(CXX_PROGRAMS)
|
|
|
|
armips: armips.cpp
|
|
$(CXX) $(CXXFLAGS) -fno-exceptions -fno-rtti -pipe $^ -o $@ -lpthread $(ARMIPS_FLAGS)
|
|
|
|
clean:
|
|
$(RM) $(PROGRAMS) $(CXXPROGRAMS)
|
|
|
|
define COMPILE
|
|
$(1): $($1_SOURCES)
|
|
$(CC) $(CFLAGS) $$^ -lm -o $$@ $($1_CFLAGS)
|
|
endef
|
|
|
|
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
|
|
|
|
# n64crc: n64crc.c
|
|
# $(CC) -o $< $@
|