25 lines
510 B
Makefile
25 lines
510 B
Makefile
# variables
|
|
TARGET = MDR
|
|
PIC = 16f1847
|
|
# software verion used:
|
|
# pk2cmd: 1.21
|
|
# sdcc: 3.4.0
|
|
# gputils: 1.3.0
|
|
|
|
all: flash
|
|
|
|
# flash program
|
|
flash: $(TARGET).hex
|
|
pk2cmd -PPIC$(PIC) -F$< -M -W -R
|
|
|
|
# compile program
|
|
compile: $(TARGET).hex
|
|
|
|
# compile program C source code (includes a default code)
|
|
$(TARGET).hex: $(TARGET).c
|
|
sdcc --std-c99 --opt-code-size --use-non-free -mpic14 -p$(PIC) $<
|
|
|
|
# remove temporary files
|
|
clean:
|
|
rm -f $(TARGET).hex $(TARGET).lst $(TARGET).asm $(TARGET).adb $(TARGET).o $(TARGET).cod
|