Use a more logical naming system.
This commit is contained in:
parent
31e3e08408
commit
50e0fbc594
|
@ -0,0 +1,13 @@
|
|||
; @P@/src/@NAME@/BottomSource.asm
|
||||
;
|
||||
; (c)2006, @AUTHOR@, <@EMAIL@>.
|
||||
; Released under the GNU GPLv2. See file COPYING or
|
||||
; http://www.gnu.org/copyleft/gpl.html for details.
|
||||
;
|
||||
|
||||
; EOF
|
||||
END
|
||||
|
||||
; options for text editors
|
||||
; kate: @KATE_MODELINE@
|
||||
; vim: @VIM_MODELINE@
|
|
@ -0,0 +1,16 @@
|
|||
; @P@/src/@NAME@/TopSource.asm
|
||||
;
|
||||
; (c)2006, @AUTHOR@, <@EMAIL@>.
|
||||
; Released under the GNU GPLv2. See file COPYING or
|
||||
; http://www.gnu.org/copyleft/gpl.html for details.
|
||||
;
|
||||
|
||||
; include processor definitions
|
||||
include p16f877.inc
|
||||
|
||||
; set up configuration bits
|
||||
__CONFIG A & B
|
||||
|
||||
; options for text editors
|
||||
; kate: @KATE_MODELINE@
|
||||
; vim: @VIM_MODELINE@
|
|
@ -0,0 +1,43 @@
|
|||
# These are external variables, and shouldn't clash with anything else
|
||||
# @CNAME@
|
||||
# @CNAME@_BUILT
|
||||
#
|
||||
|
||||
if [ -z ${@CNAME@_BUILT} ]
|
||||
then
|
||||
@CNAME@="obj/@NAME@.hex"
|
||||
EXTRAS="" # @TODO@ cflags, libs
|
||||
PROCESSOR="16f877" # @TODO@ processor type
|
||||
|
||||
echo "Building firmware ${@CNAME@}..."
|
||||
|
||||
do_cmd source src/@NAME@/build.monolithic || return 1
|
||||
|
||||
MODIFIED=0
|
||||
for test in ${MONOLITHIC_TESTS} ${SRC}
|
||||
do
|
||||
if [ ${test} -nt ${@CNAME@} ]
|
||||
then
|
||||
MODIFIED=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${MODIFIED} -ne 0 ]
|
||||
then
|
||||
echo " Compiling..."
|
||||
|
||||
[ -z "${GPASM}" ] && GPASM="gpasm"
|
||||
do_cmd ${GPASM} -p"${PROCESSOR}" -o "${@CNAME@}" ${SRC} ${EXTRAS} || return 1
|
||||
|
||||
print_success "Firmware built"
|
||||
else
|
||||
print_success "Firmware up to date"
|
||||
fi
|
||||
|
||||
@CNAME@_BUILT=1
|
||||
|
||||
fi
|
||||
|
||||
# kate: @KATE_MODELINE@
|
||||
# vim: @VIM_MODELINE@
|
|
@ -0,0 +1,18 @@
|
|||
# These are external variables, and shouldn't clash with anything else
|
||||
# @CNAME@_MONOLITHIC
|
||||
#
|
||||
|
||||
SRC="obj/@NAME@.asm"
|
||||
MONOLITHIC_TESTS="src/@NAME@/build.firmware src/@NAME@/build.monolithic"
|
||||
|
||||
if [ -z "${@CNAME@_MONOLITHIC}" ]
|
||||
then
|
||||
MONOLITHIC_SOURCE="$(echo src/@NAME@/{TopSource,BottomSource}.asm)"
|
||||
make_monolithic ${SRC} none || return 1
|
||||
|
||||
@CNAME@_MONOLITHIC=1
|
||||
MONOLITHIC_DOC="${MONOLITHIC_DOC} ${SRC}"
|
||||
fi
|
||||
|
||||
# kate: @KATE_MODELINE@
|
||||
# vim: @VIM_MODELINE@
|
|
@ -0,0 +1 @@
|
|||
source src/@NAME@/build.firmware
|
|
@ -0,0 +1 @@
|
|||
source src/@NAME@/build.install-firmware
|
|
@ -0,0 +1,12 @@
|
|||
build_target @NAME@
|
||||
|
||||
# make paths (this is for Gentoo in particular)
|
||||
build_dir_tree "${HEXDIR}" || return 1
|
||||
|
||||
# install binary
|
||||
echo "Installing firmware into '${HEXDIR}'"
|
||||
install_file "${@CNAME@}" "${HEXDIR}" 0755 || return 1
|
||||
print_success "Done"
|
||||
|
||||
# kate: @KATE_MODELINE@
|
||||
# vim: @VIM_MODELINE@
|
|
@ -0,0 +1,11 @@
|
|||
if [ $# -ne 0 ]
|
||||
then
|
||||
print_failure "Too many arguments. None required for this module."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
do_parameter_subst
|
||||
true
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
# vim: expandtab:ts=4:sw=4
|
Loading…
Reference in New Issue