You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Refresh 10
This commit is contained in:
@@ -1,49 +1,58 @@
|
||||
CC := gcc
|
||||
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O3 -s
|
||||
PROGRAMS := n64graphics n64graphics_ci mio0 n64cksum textconv patch_libultra_math iplfontutil aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
|
||||
CXX := g++
|
||||
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s
|
||||
LDFLAGS := -lm
|
||||
PROGRAMS := n64graphics n64graphics_ci mio0 n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
|
||||
|
||||
# if armips is not found on the system, build it in tools
|
||||
ifeq (, $(shell which armips 2> /dev/null))
|
||||
CXX_PROGRAMS += armips
|
||||
endif
|
||||
|
||||
default: all
|
||||
|
||||
armips: armips.cpp
|
||||
$(CXX) $(CXXFLAGS) -fno-exceptions -fno-rtti -pipe $^ -o $@ -lpthread
|
||||
|
||||
n64graphics_SOURCES := n64graphics.c utils.c
|
||||
n64graphics_CFLAGS := -DN64GRAPHICS_STANDALONE
|
||||
|
||||
n64graphics_ci_SOURCES := n64graphics_ci_dir/n64graphics_ci.c n64graphics_ci_dir/exoquant/exoquant.c n64graphics_ci_dir/utils.c
|
||||
n64graphics_ci_CFLAGS := -O2 # 3s faster compile time
|
||||
|
||||
mio0_SOURCES := libmio0.c
|
||||
mio0_CFLAGS := -DMIO0_STANDALONE
|
||||
|
||||
n64cksum_SOURCES := n64cksum.c libmio0.c libsm64.c utils.c
|
||||
n64cksum_SOURCES := n64cksum.c utils.c
|
||||
n64cksum_CFLAGS := -DN64CKSUM_STANDALONE
|
||||
|
||||
textconv_SOURCES := textconv.c utf8.c hashtable.c
|
||||
patch_libultra_math_SOURCES := patch_libultra_math.c
|
||||
|
||||
iplfontutil_SOURCES := iplfontutil.c
|
||||
iplfontutil_CFLAGS := -O2 # faster compile time
|
||||
|
||||
aifc_decode_SOURCES := aifc_decode.c
|
||||
aifc_decode_CFLAGS := -O2 # both runs and compiles faster than -O3
|
||||
|
||||
aiff_extract_codebook_SOURCES := aiff_extract_codebook.c
|
||||
|
||||
tabledesign_SOURCES := sdk-tools/tabledesign/codebook.c sdk-tools/tabledesign/estimate.c sdk-tools/tabledesign/print.c sdk-tools/tabledesign/tabledesign.c
|
||||
tabledesign_CFLAGS := -Wno-uninitialized -laudiofile
|
||||
tabledesign_CFLAGS := -Wno-uninitialized
|
||||
tabledesign_LDFLAGS := -laudiofile
|
||||
|
||||
vadpcm_enc_SOURCES := sdk-tools/adpcm/vadpcm_enc.c sdk-tools/adpcm/vpredictor.c sdk-tools/adpcm/quant.c sdk-tools/adpcm/util.c sdk-tools/adpcm/vencode.c
|
||||
vadpcm_enc_CFLAGS := -Wno-unused-result -Wno-uninitialized -Wno-sign-compare -Wno-absolute-value
|
||||
|
||||
extract_data_for_mio_SOURCES := extract_data_for_mio.c
|
||||
extract_data_for_mio_CFLAGS := -O2
|
||||
|
||||
skyconv_SOURCES := skyconv.c n64graphics.c utils.c
|
||||
skyconv_CFLAGS := -O2 -lm
|
||||
|
||||
all: $(PROGRAMS)
|
||||
all: $(PROGRAMS) $(CXX_PROGRAMS)
|
||||
|
||||
clean:
|
||||
$(RM) $(PROGRAMS)
|
||||
$(RM) $(PROGRAMS) $(CXX_PROGRAMS)
|
||||
|
||||
define COMPILE
|
||||
$(1): $($1_SOURCES)
|
||||
$(CC) $(CFLAGS) $$^ -lm -o $$@ $($1_CFLAGS)
|
||||
$(CC) $(CFLAGS) $($1_CFLAGS) $$^ -o $$@ $(LDFLAGS) $($1_LDFLAGS)
|
||||
endef
|
||||
|
||||
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
|
||||
|
||||
.PHONY: all clean default
|
||||
|
||||
Reference in New Issue
Block a user