hbc/channel/banner/Makefile

65 lines
1.8 KiB
Makefile
Raw Permalink Normal View History

2016-11-23 06:35:12 +01:00
ifeq ($(WIN32), 1)
export PREFIX = i586-mingw32msvc-
export EXE := .exe
export LFLAGS = -lws2_32
else
export PREFIX =
export EXE =
export LFLAGS =
endif
export PYWII := $(CURDIR)/../../pywii/pywii-tools
export ALAMEDA := $(CURDIR)/../../pywii/Alameda
export PNG2TPL := $(CURDIR)/tools/png2tpl$(EXE)
export MKBNS := $(CURDIR)/tools/mkbns$(EXE)
export LZ77 := $(CURDIR)/tools/lz77$(EXE)
2016-11-30 10:57:03 +01:00
export ADDIMD5 := python2 $(CURDIR)/tools/addimd5.py
export ARCPACK := python2 $(PYWII)/arcpack.py
2016-11-23 06:35:12 +01:00
export SOX := sox
all: channel.imet
channel.imet: build/data.arc names.txt tools/join-imet.py
2016-11-30 10:57:03 +01:00
python2 tools/join-imet.py $@ build/data.arc build/icon.arc build/banner.arc build/sound.bns names.txt
2016-11-23 06:35:12 +01:00
build/data.arc : build/data/meta/icon.bin build/data/meta/banner.bin build/data/meta/sound.bin
$(ARCPACK) $@ build/data
build/data/meta/icon.bin : icon/* $(PNG2TPL) $(LZ77)
$(MAKE) -C icon -f ../Makefile.section
build/data/meta/banner.bin : banner/* $(PNG2TPL) $(LZ77)
$(MAKE) -C banner -f ../Makefile.section
build/data/meta/sound.bin : build/sound.bns
@[ ! -d build/data/meta ] && mkdir -p build/data/meta || true
$(ADDIMD5) $< $@
build/sound.bns : build/wiibrew-banner-intro-part.raw build/wiibrew-banner-loop-part.raw $(MKBNS)
@[ ! -d build ] && mkdir -p build || true
$(MKBNS) build/wiibrew-banner-intro-part.raw $@ 1 build/wiibrew-banner-loop-part.raw
build/%.raw : sound/%.wav
@[ ! -d build ] && mkdir -p build || true
$(SOX) $< -r 32000 -c 2 -e signed-integer -b 16 -t raw $@
testi : channel.imet
2016-11-30 10:57:03 +01:00
python2 $(ALAMEDA)/Alameda.py channel.imet icon
2016-11-23 06:35:12 +01:00
testb : channel.imet
2016-11-30 10:57:03 +01:00
python2 $(ALAMEDA)/Alameda.py channel.imet banner
2016-11-23 06:35:12 +01:00
$(PNG2TPL): tools/*.c
$(MAKE) -C tools png2tpl$(EXE)
$(MKBNS): tools/*.c
$(MAKE) -C tools mkbns$(EXE)
$(LZ77): tools/*.c
$(MAKE) -C tools lz77$(EXE)
clean:
rm -f channel.imet
rm -rf build
$(MAKE) -C tools clean