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)
19 all: $(classes) $(resources:src/%=%)
28 git archive HEAD --prefix=vimcoder-$(version)/ | bzip2 >vimcoder-$(version).tar.bz2
35 $(classes): $(sources) | $(library)
36 $(JAVAC) $(JAVACFLAGS) $^
41 $(resource_path)/%: src/$(resource_path)/% | $(resource_path)
47 curl -o $@ http://www.topcoder.com/contest/classes/ContestApplet.jar
51 jar cvf $@ COPYING README.md com
54 .PHONY: all clean distclean dist fetch jar