Permalink
Browse files

Add sounds to distributables, and compress using Ogg Vorbis.

  • Loading branch information...
stephank committed Jun 6, 2010
1 parent 6d95ff6 commit 52963151af669ec1a4c7f34fa079aaa4acc351da
Showing with 16 additions and 3 deletions.
  1. +2 −1 .gitignore
  2. +13 −2 Makefile
  3. +1 −0 dist/snd/placeholder
View
@@ -4,4 +4,5 @@
dist/arashi.js
dist/arashi.css
dist/arashi.html
-
+dist/snd/*.wav
+dist/snd/*.ogg
View
@@ -5,19 +5,24 @@ JAVA ?= java
YUICOMP ?= ../yuicompressor.jar
HTMLCOMP ?= ../htmlcompressor.jar
+OGGENC ?= oggenc
+
JSFILES := $(shell find src -iname '*.js' | grep -v '.lint.js')
+WAVFILES := $(shell find snd -iname '*.wav')
+OGGFILES := $(WAVFILES:%.wav=%.ogg)
+DISTSOUNDS := $(WAVFILES:snd/%=dist/snd/%) $(OGGFILES:snd/%=dist/snd/%)
usage:
@echo "The following make targets are defined:"
@echo " dist: Create compressed JavaScript and CSS."
@echo " lint: Run JSLint on all JavaScript source files."
@echo " clean: Remove any files created by the above."
-dist: dist/arashi.html dist/arashi.js dist/arashi.css
+dist: dist/arashi.html dist/arashi.js dist/arashi.css ${DISTSOUNDS}
clean:
- -rm -f dist/arashi.html dist/arashi.js dist/arashi.css
+ -rm -f dist/arashi.html dist/arashi.js dist/arashi.css ${DISTSOUNDS}
-find src -iname '*.lint.js' | xargs rm -f
lint:
@@ -46,4 +51,10 @@ dist/arashi.js: ${JSFILES}
dist/arashi.css: arashi.css
${JAVA} -jar ${YUICOMP} --type css -o dist/arashi.css arashi.css
+dist/snd/%.wav: snd/%.wav
+ cp $< $@
+
+dist/snd/%.ogg: dist/snd/%.wav
+ ${OGGENC} -o $@ -Q $<
+
.PHONY: usage dist clean lint
View
@@ -0,0 +1 @@
+This directory holds compressed and post-processed distributables created by Makefile.

0 comments on commit 5296315

Please sign in to comment.