Clone of official tools

Committer:
theotherjimmy
Date:
Tue Sep 25 13:43:09 2018 -0500
Revision:
43:2a7da56ebd24
Release 5.10.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
theotherjimmy 43:2a7da56ebd24 1 #
theotherjimmy 43:2a7da56ebd24 2 # There exist several targets which are by default empty and which can be
theotherjimmy 43:2a7da56ebd24 3 # used for execution of your targets. These targets are usually executed
theotherjimmy 43:2a7da56ebd24 4 # before and after some main targets. They are:
theotherjimmy 43:2a7da56ebd24 5 #
theotherjimmy 43:2a7da56ebd24 6 # .build-pre: called before 'build' target
theotherjimmy 43:2a7da56ebd24 7 # .build-post: called after 'build' target
theotherjimmy 43:2a7da56ebd24 8 # .clean-pre: called before 'clean' target
theotherjimmy 43:2a7da56ebd24 9 # .clean-post: called after 'clean' target
theotherjimmy 43:2a7da56ebd24 10 # .clobber-pre: called before 'clobber' target
theotherjimmy 43:2a7da56ebd24 11 # .clobber-post: called after 'clobber' target
theotherjimmy 43:2a7da56ebd24 12 # .all-pre: called before 'all' target
theotherjimmy 43:2a7da56ebd24 13 # .all-post: called after 'all' target
theotherjimmy 43:2a7da56ebd24 14 # .help-pre: called before 'help' target
theotherjimmy 43:2a7da56ebd24 15 # .help-post: called after 'help' target
theotherjimmy 43:2a7da56ebd24 16 #
theotherjimmy 43:2a7da56ebd24 17 # Targets beginning with '.' are not intended to be called on their own.
theotherjimmy 43:2a7da56ebd24 18 #
theotherjimmy 43:2a7da56ebd24 19 # Main targets can be executed directly, and they are:
theotherjimmy 43:2a7da56ebd24 20 #
theotherjimmy 43:2a7da56ebd24 21 # build build a specific configuration
theotherjimmy 43:2a7da56ebd24 22 # clean remove built files from a configuration
theotherjimmy 43:2a7da56ebd24 23 # clobber remove all built files
theotherjimmy 43:2a7da56ebd24 24 # all build all configurations
theotherjimmy 43:2a7da56ebd24 25 # help print help mesage
theotherjimmy 43:2a7da56ebd24 26 #
theotherjimmy 43:2a7da56ebd24 27 # Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
theotherjimmy 43:2a7da56ebd24 28 # .help-impl are implemented in nbproject/makefile-impl.mk.
theotherjimmy 43:2a7da56ebd24 29 #
theotherjimmy 43:2a7da56ebd24 30 # Available make variables:
theotherjimmy 43:2a7da56ebd24 31 #
theotherjimmy 43:2a7da56ebd24 32 # CND_BASEDIR base directory for relative paths
theotherjimmy 43:2a7da56ebd24 33 # CND_DISTDIR default top distribution directory (build artifacts)
theotherjimmy 43:2a7da56ebd24 34 # CND_BUILDDIR default top build directory (object files, ...)
theotherjimmy 43:2a7da56ebd24 35 # CONF name of current configuration
theotherjimmy 43:2a7da56ebd24 36 # CND_PLATFORM_${CONF} platform name (current configuration)
theotherjimmy 43:2a7da56ebd24 37 # CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
theotherjimmy 43:2a7da56ebd24 38 # CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
theotherjimmy 43:2a7da56ebd24 39 # CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
theotherjimmy 43:2a7da56ebd24 40 # CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
theotherjimmy 43:2a7da56ebd24 41 # CND_PACKAGE_NAME_${CONF} name of package (current configuration)
theotherjimmy 43:2a7da56ebd24 42 # CND_PACKAGE_PATH_${CONF} path to package (current configuration)
theotherjimmy 43:2a7da56ebd24 43 #
theotherjimmy 43:2a7da56ebd24 44 # NOCDDL
theotherjimmy 43:2a7da56ebd24 45
theotherjimmy 43:2a7da56ebd24 46
theotherjimmy 43:2a7da56ebd24 47 # Environment
theotherjimmy 43:2a7da56ebd24 48 MKDIR=mkdir
theotherjimmy 43:2a7da56ebd24 49 CP=cp
theotherjimmy 43:2a7da56ebd24 50 CCADMIN=CCadmin
theotherjimmy 43:2a7da56ebd24 51
theotherjimmy 43:2a7da56ebd24 52 BUILDDIR = BUILD
theotherjimmy 43:2a7da56ebd24 53 PLATFORM = {{target}}
theotherjimmy 43:2a7da56ebd24 54 ELF2BIN = '{{elf2bin_cmd}}'
theotherjimmy 43:2a7da56ebd24 55 TARGET = ${CND_DISTDIR}/${CONF}/${CND_PLATFORM}/{{name}}
theotherjimmy 43:2a7da56ebd24 56
theotherjimmy 43:2a7da56ebd24 57
theotherjimmy 43:2a7da56ebd24 58 # build
theotherjimmy 43:2a7da56ebd24 59 build: .build-post
theotherjimmy 43:2a7da56ebd24 60
theotherjimmy 43:2a7da56ebd24 61 .build-pre:
theotherjimmy 43:2a7da56ebd24 62 # Add your pre 'build' code here...
theotherjimmy 43:2a7da56ebd24 63
theotherjimmy 43:2a7da56ebd24 64 .build-post: .build-impl
theotherjimmy 43:2a7da56ebd24 65 # Add your post 'build' code here...
theotherjimmy 43:2a7da56ebd24 66 $(ELF2BIN) -O binary ${TARGET}.elf ${TARGET}.bin
theotherjimmy 43:2a7da56ebd24 67 +@echo "===== bin file ready to flash: $(TARGET).bin ====="
theotherjimmy 43:2a7da56ebd24 68 $(ELF2BIN) -O ihex ${TARGET}.elf ${TARGET}.hex
theotherjimmy 43:2a7da56ebd24 69 cp ${TARGET}.* ${CND_BUILDDIR}/${CONF}/${CND_PLATFORM}
theotherjimmy 43:2a7da56ebd24 70
theotherjimmy 43:2a7da56ebd24 71 # clean
theotherjimmy 43:2a7da56ebd24 72 clean: .clean-post
theotherjimmy 43:2a7da56ebd24 73
theotherjimmy 43:2a7da56ebd24 74 .clean-pre:
theotherjimmy 43:2a7da56ebd24 75 # Add your pre 'clean' code here...
theotherjimmy 43:2a7da56ebd24 76
theotherjimmy 43:2a7da56ebd24 77 .clean-post: .clean-impl
theotherjimmy 43:2a7da56ebd24 78 # Add your post 'clean' code here...
theotherjimmy 43:2a7da56ebd24 79
theotherjimmy 43:2a7da56ebd24 80
theotherjimmy 43:2a7da56ebd24 81 # clobber
theotherjimmy 43:2a7da56ebd24 82 clobber: .clobber-post
theotherjimmy 43:2a7da56ebd24 83
theotherjimmy 43:2a7da56ebd24 84 .clobber-pre:
theotherjimmy 43:2a7da56ebd24 85 # Add your pre 'clobber' code here...
theotherjimmy 43:2a7da56ebd24 86
theotherjimmy 43:2a7da56ebd24 87 .clobber-post: .clobber-impl
theotherjimmy 43:2a7da56ebd24 88 # Add your post 'clobber' code here...
theotherjimmy 43:2a7da56ebd24 89
theotherjimmy 43:2a7da56ebd24 90
theotherjimmy 43:2a7da56ebd24 91 # all
theotherjimmy 43:2a7da56ebd24 92 all: .all-post
theotherjimmy 43:2a7da56ebd24 93
theotherjimmy 43:2a7da56ebd24 94 .all-pre:
theotherjimmy 43:2a7da56ebd24 95 # Add your pre 'all' code here...
theotherjimmy 43:2a7da56ebd24 96
theotherjimmy 43:2a7da56ebd24 97 .all-post: .all-impl
theotherjimmy 43:2a7da56ebd24 98 # Add your post 'all' code here...
theotherjimmy 43:2a7da56ebd24 99
theotherjimmy 43:2a7da56ebd24 100
theotherjimmy 43:2a7da56ebd24 101 # build tests
theotherjimmy 43:2a7da56ebd24 102 build-tests: .build-tests-post
theotherjimmy 43:2a7da56ebd24 103
theotherjimmy 43:2a7da56ebd24 104 .build-tests-pre:
theotherjimmy 43:2a7da56ebd24 105 # Add your pre 'build-tests' code here...
theotherjimmy 43:2a7da56ebd24 106
theotherjimmy 43:2a7da56ebd24 107 .build-tests-post: .build-tests-impl
theotherjimmy 43:2a7da56ebd24 108 # Add your post 'build-tests' code here...
theotherjimmy 43:2a7da56ebd24 109
theotherjimmy 43:2a7da56ebd24 110
theotherjimmy 43:2a7da56ebd24 111 # run tests
theotherjimmy 43:2a7da56ebd24 112 test: .test-post
theotherjimmy 43:2a7da56ebd24 113
theotherjimmy 43:2a7da56ebd24 114 .test-pre: build-tests
theotherjimmy 43:2a7da56ebd24 115 # Add your pre 'test' code here...
theotherjimmy 43:2a7da56ebd24 116
theotherjimmy 43:2a7da56ebd24 117 .test-post: .test-impl
theotherjimmy 43:2a7da56ebd24 118 # Add your post 'test' code here...
theotherjimmy 43:2a7da56ebd24 119
theotherjimmy 43:2a7da56ebd24 120
theotherjimmy 43:2a7da56ebd24 121 # help
theotherjimmy 43:2a7da56ebd24 122 help: .help-post
theotherjimmy 43:2a7da56ebd24 123
theotherjimmy 43:2a7da56ebd24 124 .help-pre:
theotherjimmy 43:2a7da56ebd24 125 # Add your pre 'help' code here...
theotherjimmy 43:2a7da56ebd24 126
theotherjimmy 43:2a7da56ebd24 127 .help-post: .help-impl
theotherjimmy 43:2a7da56ebd24 128 # Add your post 'help' code here...
theotherjimmy 43:2a7da56ebd24 129
theotherjimmy 43:2a7da56ebd24 130
theotherjimmy 43:2a7da56ebd24 131
theotherjimmy 43:2a7da56ebd24 132 # include project implementation makefile
theotherjimmy 43:2a7da56ebd24 133 include nbproject/Makefile-impl.mk
theotherjimmy 43:2a7da56ebd24 134
theotherjimmy 43:2a7da56ebd24 135 # include project make variables
theotherjimmy 43:2a7da56ebd24 136 include nbproject/Makefile-variables.mk
theotherjimmy 43:2a7da56ebd24 137
theotherjimmy 43:2a7da56ebd24 138 CND_BUILDDIR = ${BUILDDIR}
theotherjimmy 43:2a7da56ebd24 139 CND_PLATFORM = ${PLATFORM}