Makefile Guidelines

The makefiles provided with the designs in <sdsoc_root>/samples consolidate all sdscc hardware function options into a single command line. This is not required, but has the benefit of preserving the overall control structure and dependencies within a makefile without requiring change to the makefile actions for files containing a hardware function.

  • You can define make variables to capture the entire SDSoC environment command line, for example: CC = sds++ ${SDSFLAGS} for C++ files, invoking sdscc for C files. In this way, all SDSoC environment options are consolidated in the ${CC} variable. Define the platform and target OS once in this variable.
  • There must be a separate -sds-hw/-sds-end clause in the command line for each file that contains a hardware function. For example:
    -sds-hw foo foo.cpp -clkid 1 -sds-end
    For the list of the SDSoC compiler and linker options, see SDSCC/SDS++ Compiler Commands and Options or use sdscc --help.