diff options
Diffstat (limited to 'Algorithms/Part-II/1-WordNet')
-rw-r--r-- | Algorithms/Part-II/1-WordNet/Makefile | 28 | ||||
-rwxr-xr-x | Algorithms/Part-II/1-WordNet/run.sh | 19 |
2 files changed, 28 insertions, 19 deletions
diff --git a/Algorithms/Part-II/1-WordNet/Makefile b/Algorithms/Part-II/1-WordNet/Makefile new file mode 100644 index 0000000..70edcc8 --- /dev/null +++ b/Algorithms/Part-II/1-WordNet/Makefile @@ -0,0 +1,28 @@ + +CC = javac +ALGS4 = ../../algs4 +BIN = Outcast +SRCS = SAP.java Outcast.java WordNet.java Outcast.java +CLASSES = SAP.class Outcast.class WordNet.class Outcast.class +CLASSPATH = -classpath '.:$(ALGS4)/algs4.jar:$(ALGS4)/stdlib.jar' + +.SUFFIXES: +.SUFFIXES: .java .class +.PHONY: clean $(BIN) + +.java.class: + $(CC) -Xlint $(CLASSPATH) $< + $(ALGS4)/bin/checkstyle $< + +$(BIN): $(CLASSES) + +test: $(BIN) $(CLASSES) + java $(CLASSPATH) $(BIN) + +zip: $(BIN) + $(ALGS4)/bin/findbugs $(BIN).class + rm -f *.zip + zip wordnet.zip $(SRCS) + +clean: + rm -f *.class *.zip $(BIN) diff --git a/Algorithms/Part-II/1-WordNet/run.sh b/Algorithms/Part-II/1-WordNet/run.sh deleted file mode 100755 index 7ec80c5..0000000 --- a/Algorithms/Part-II/1-WordNet/run.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash - -ALGS4=../../algs4 -export CLASSPATH="$ALGS4/algs4.jar:$ALGS4/stdlib.jar:." - -CLASSES="SpecializedBFS WordNet SAP Outcast" - -rm *.class *.zip 2>/dev/null - -for kls in $CLASSES; do - $ALGS4/bin/checkstyle ${kls}.java - javac -Xlint ${kls}.java || exit 1 -done -$ALGS4/bin/findbugs *.class - -java Outcast || exit 1 - -zip wordnet.zip *.java - |