mk

Makefile templates
git clone git://git.margiolis.net/mk.git
Log | Files | Refs | README | LICENSE

pic.mk (566B)


      1 # See LICENSE file for copyright and license details.
      2 # <++>
      3 .POSIX:
      4 
      5 BIN = <++>
      6 CC = sdcc
      7 CPPFLAGS =
      8 CFLAGS = --use-non-free -mpic<++> -p<++> ${CPPFLAGS}
      9 PIC = <++>
     10 
     11 SRC = <++>
     12 OBJ = ${SRC:.c=.o}
     13 
     14 all: options ${BIN}
     15 
     16 options:
     17 	@echo ${BIN} build options:
     18 	@echo "CC	= ${CC}"
     19 	@echo "CFLAGS	= ${CFLAGS}"
     20 
     21 ${BIN}: ${OBJ}
     22 	${CC} ${OBJ} ${CFLAGS} -o $@
     23 
     24 .c.o:
     25 	${CC} -c ${CFLAGS} $<
     26 
     27 flash: all
     28 	pk2cmd -P ${PIC} -X -M -F ${BIN}.hex
     29 
     30 erase:
     31 	pk2cmd -P ${PIC} -E ${BIN}.hex
     32 
     33 clean:
     34 	rm -f *.hex *.asm *.cod *.hex *.lst *.o *.core
     35 
     36 .PHONY: all options clean flash clean