diff --git a/demos/WordCount/Makefile b/demos/WordCount/Makefile new file mode 100644 index 0000000..747cf39 --- /dev/null +++ b/demos/WordCount/Makefile @@ -0,0 +1,39 @@ +##################################################################### +# Copyright (C)2014, International Business Machines Corporation and +# others. All Rights Reserved. +##################################################################### + +STREAMS_SPLPATH ?= ../../com.ibm.streamsx.hdfs +SPLC_FLAGS = -a --spl-path $(STREAMS_SPLPATH) --data-directory=data + +#-t ../com.ibm.streamsx.hdfs -t ../../com.ibm.streamsx.hdfs + +SPLC = $(STREAMS_INSTALL)/bin/sc + +SPL_CMD_ARGS ?= +SPL_MAIN_COMPOSITE = WordCount +STANDALONE_OUTPUT_DIR = output/Standalone +DISTRIBUTED_OUTPUT_DIR = output/Distributed +SOURCES = WordCount.spl ReadAndTokenize.spl + +all: distributed + +standalone: output/Standalone/bin/standalone + +distributed: output/Distributed/Main.sab + +output/Standalone/bin/standalone: $(SOURCES) + $(SPLC) $(SPLC_FLAGS) -T -M $(SPL_MAIN_COMPOSITE) --output-dir ./$(STANDALONE_OUTPUT_DIR) $(SPL_CMD_ARGS) + +output/Distributed/Main.sab: $(SOURCES) + $(SPLC) $(SPLC_FLAGS) -M $(SPL_MAIN_COMPOSITE) --output-dir ./$(DISTRIBUTED_OUTPUT_DIR) $(SPL_CMD_ARGS) + +clean: clean-standalone clean-distributed + +clean-standalone: + $(SPLC) $(SPLC_FLAGS) -C -M $(SPL_MAIN_COMPOSITE) --output-dir ./$(STANDALONE_OUTPUT_DIR)/$(SPL_MAIN_COMPOSITE) + -rm -rf toolkit.xml + +clean-distributed: + $(SPLC) $(SPLC_FLAGS) -C -M $(SPL_MAIN_COMPOSITE) --output-dir ./$(DISTRIBUTED_OUTPUT_DIR)/$(SPL_MAIN_COMPOSITE) + -rm -rf toolkit.xml diff --git a/demos/WordCount/info.xml b/demos/WordCount/info.xml index 8c30255..43b2ab1 100644 --- a/demos/WordCount/info.xml +++ b/demos/WordCount/info.xml @@ -8,7 +8,7 @@ WordCount - Show how to implement WordCount and WordCountWithCombine + Show how to implement WordCount 1.0.0 4.0