# recommended programming order # one test on PIC#0 # first time: erase, write FOO-entire0.hex # subsequently if only FOO.asm changed: update FOO.hex # for all pics # first time: for each individually erase, write perpicNUM.hex # then for all update FOO.hex # subsequently: for all update FOO.hex # other possibilities are not ruled out # # filename conventions - contents of hex files # FOO.hex FOO.o (only) # FOO-withcfg.hex FOO.o config.o # FOO-entire0.hex FOO.o idlocs0.o config.o # perpicNUMBER.hex idlocsNUMBER.o config.o PROGRAM_HEXES= $(addsuffix .hex, $(PROGRAMS)) \ $(addsuffix -withcfg.hex, $(PROGRAMS)) all: $(TARGETS) $(PROGRAM_HEXES) LINK= gplink -o $@ $^ ASSEMBLE= gpasm -p 18f458 %-withcfg.hex: %.o config.o $(LIBS) $(LINK) %.hex: %.o $(LIBS) $(LINK) %.o: %.asm $(INCLUDES) $(ASSEMBLE) -c $< mv $*.lst $*-asm.lst .PRECIOUS: %.o pic-clean: -rm -f -- *~ *.new *.tmp -rm -f *.hex *.cod *.lst *.o