Auto-generated makefiles
The SPL compiler can generate a sample makefile that can be used to easily manage compiler options and compile the application quickly from the command line.
The sc
command generates a sample makefile when given the -m, --makefile-generation option. For example, you can
issue the command sc -m -M my.sample::FooBar
to generate the following
makefile with the name Makefile:
.PHONY: all distributed clean
SPLC_FLAGS ?= -a
SPLC = $(STREAMS_INSTALL)/bin/sc
SPL_CMD_ARGS ?=
SPL_MAIN_COMPOSITE = my.sample::FooBar
all: distributed
distributed:
$(SPLC) $(SPLC_FLAGS) -M $(SPL_MAIN_COMPOSITE) $(SPL_CMD_ARGS)
clean:
$(SPLC) $(SPLC_FLAGS) -C -M $(SPL_MAIN_COMPOSITE)
When you issue a make
command in the application directory, this makefile is
used to compile a stream application . The -a, --optimized-code-generation option turns on all code
generation optimizations, and passes the highest optimization options to the C++
compiler for compiling the generated code.