2 # Use this file with GNU make to compile and package VimCoder.
3 # Supported targets: all clean distclean dist fetch jar
8 sources = $(wildcard src/com/dogcows/*.java)
9 classes = $(sources:src/%.java=%.class)
10 library = lib/ContestApplet.jar
11 jarfile = $(project)-$(version).jar
12 resource_path = com/dogcows/resources
13 resources = $(wildcard src/$(resource_path)/*)
16 JAVACFLAGS = -d . -sourcepath src -classpath $(library)
21 all: $(classes) $(resources:src/%=%)
30 git archive HEAD --prefix=vimcoder-$(version)/ | bzip2 >vimcoder-$(version).tar.bz2
40 $(classes): $(sources) | $(library)
41 $(JAVAC) $(JAVACFLAGS) $^
46 $(resource_path)/%: src/$(resource_path)/% | $(resource_path)
52 curl -o $@ http://www.topcoder.com/contest/classes/ContestApplet.jar
56 jar cvf $@ COPYING README.md com
59 .PHONY: all clean distclean dist fetch jar test