#sonar40.asm make file
#Note: Pin 24 may need to be isolated from the 40 pin zif
#socket the first time the chip is programmed to overide the
#factory default LVP mode.

target = 16f876
#config word: No LVP, Flash PGM mem protected, pwr-up timer enabled,
# brownout enabled,  watchdog disabled, HS oscillator
config = 3d72
sname = sonar40

#
all: $(sname).hex
# Assemble the program from the asm source
$(sname).hex: $(sname).asm
	gpasm  $(sname).asm
#
# Clean up the directory
clean:
	rm -f $(sname).hex  core  $(sname).asm $(sname).lst
#
pgm:
	tm4 -c $(target) -z $(config) $(sname).hex

picstart:
	picp /dev/pic $(target) -wc 0x$(config) -wp $(sname).hex

