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