#makefile für gnu make (vom WinAVR bzw. avr-gcc), Compiler Microchip XC8
#Programmierprogramm = Kommandozeilenversion von PICPgm, vorkonfiguriert für Parallelport
#Aufruf mit „make -f xc.mak“ (compilieren) oder „make -f xc.mak flash“ (flashen)
CHIP=16F1454
all:HID.hex
HID.hex: Usb.c Main.c UsbDescriptors.h Usb.h xc.mak
#sed removes nasty nag message from compiler output
xc8.exe --asmlist --chip=$(CHIP) -oXXX.hex -q Usb.c Main.c "--errformat=%f:%l:%c: error: %s" "--warnformat=%f:%l:%c: warning: %s" "--msgformat=%f:%l:%c: message: %s" | sed "/FREE/,// d"
#remove all the temporary stuff that xc8 compiler produces, keeping the one-and-only output file
@mv -f XXX.hex $@ 2> nul
@rm -f startup.* *.d *.p1 *.pre 2> nul
flash: HID.hex
"E:\Program Files\MPLABX\PICPgm\picpgm" -p $<
Detected encoding: UTF-8 | 0
|