23 lines
341 B
Makefile
Executable File
23 lines
341 B
Makefile
Executable File
SRC=*.c
|
|
|
|
CC=sdcc
|
|
FAMILY=pic16
|
|
PROC=18f4550
|
|
HEX:=main.hex
|
|
|
|
all: $(SRC:.c=.hex)
|
|
|
|
comp: $(SRC)
|
|
$(CC) --use-non-free -m$(FAMILY) -p$(PROC) $^
|
|
|
|
clean:
|
|
rm -f $(SRC:.c=.asm) $(SRC:.c=.cod) $(SRC:.c=.hex) $(SRC:.c=.lst) $(SRC:.c=.o)
|
|
|
|
asm: *.asm
|
|
gpasm -p 18F4550 -o main.hex $^
|
|
|
|
program: ${HEX}
|
|
pk2cmd -M -PPIC18F4550 -F${HEX}
|
|
|
|
.PHONY: all clean
|