wordsearch/Makefile

34 lines
863 B
Makefile
Raw Permalink Normal View History

2020-04-05 12:25:43 +01:00
JAVA = /usr/bin/java
2020-05-29 13:49:59 +01:00
LIBS = .:war/WEB-INF/lib/commons-lang.jar:war/WEB-INF/lib/sqlite-jdbc.jar
2020-04-05 12:25:43 +01:00
JAVAC = /usr/bin/javac
2020-05-29 13:49:59 +01:00
JFLAGS = -g -classpath $(LIBS)
2020-04-05 12:25:43 +01:00
SRCS = uk/org/mafoo/wordsearch/CouldNotPlaceWordException.java \
uk/org/mafoo/wordsearch/Bounds.java \
uk/org/mafoo/wordsearch/GridFactory.java \
uk/org/mafoo/wordsearch/DistributedRandomNumberGenerator.java \
uk/org/mafoo/wordsearch/Direction.java
2020-04-05 13:25:37 +01:00
JSPS = $(wildcard war/*.jsp war/*.css war/WEB-INF/jspf/*.jspf)
2020-04-05 12:25:43 +01:00
OBJS = ${SRCS:.java=.class}
.SUFFIXES: .java .class
.PHONY: default clean
default: wordsearch.war
clean:
rm -f $(OBJS) wordsearch.jar wordsearch.war
.java.class:
$(JAVAC) $(JFLAGS) $<
wordsearch.jar: $(OBJS)
jar cf $@ $(OBJS)
2020-04-05 13:25:37 +01:00
war/WEB-INF/lib/wordsearch.jar: wordsearch.jar
cp $< $@
wordsearch.war: war/WEB-INF/lib/wordsearch.jar $(JSPS)
jar -cvf $@ -C war .