Makefile Guidelines

The makefiles provided with the designs in/samplesconsolidate allsdscchardware 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, invokingsdsccfor 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-endclause 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, seeSDSCC/SDS++ Compiler Commands and Optionsor usesdscc --help.