Mercurial > ~darius > hgwebdir.cgi > stm32temp
changeset 28:7f8e5780024b
- Add depend target.
- Switch to Homebrew toolchain
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Tue, 27 Nov 2012 13:16:47 +1030 |
parents | 5c9d2e3d6591 |
children | 077cdff4662a |
files | BSDmakefile.arm |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/BSDmakefile.arm Tue Nov 20 21:54:06 2012 +1030 +++ b/BSDmakefile.arm Tue Nov 27 13:16:47 2012 +1030 @@ -2,9 +2,10 @@ .SUFFIXES: .bin .elf .hex .map .lst .dmp -.MAIN: ${PROG}.bin +.MAIN: depend ${PROG}.bin -TCHAIN= ${HOME}/arm/arm-none-eabi-gcc-4_6/bin/arm-none-eabi +#TCHAIN= ${HOME}/arm/arm-none-eabi-gcc-4_6/bin/arm-none-eabi +TCHAIN= /usr/local/Cellar/gcc-arm-none-eabi/20120614/bin/arm-none-eabi #TCHAIN= arm-elf #TCHAINSF= -4.6 @@ -15,6 +16,7 @@ OBJCOPY= ${TCHAIN}-objcopy${TCHAINSF} GDB= ${TCHAIN}-gdb RM= rm -f +MKDEPCMD= mkdep CFLAGS+= ${COMMONFLAGS} @@ -36,7 +38,7 @@ ${OBJCOPY} -O binary ${.ALLSRC} ${.TARGET} clean: - ${RM} ${PROG}.hex ${PROG}.out ${PROG}.elf ${PROG}.bin ${PROG}.map ${OBJS} ${OBJS:S/.o/.lst/} ${PROG}.dmp + ${RM} ${PROG}.hex ${PROG}.out ${PROG}.elf ${PROG}.bin ${PROG}.map ${OBJS} ${OBJS:S/.o/.lst/} ${PROG}.dmp .depend debug: ${GDB} -ex "target extended-remote ${DBGPORT}" -ex "attach 1" ${PROG}.elf @@ -44,8 +46,12 @@ load: ${GDB} -ex "target extended-remote ${DBGPORT}" -ex "attach 1" -ex "load" -ex "detach" -ex "quit" ${PROG}.elf +depend: .depend + +.depend: ${SRCS} + CC='${CC}' ${MKDEPCMD} ${CFLAGS} ${.ALLSRC} + ######################### #;;; Local Variables: *** #;;; mode:makefile *** #;;; End: *** -