autocompile reset_tty fix
[svn42.git] / rf433ctl / Makefile
index 916e3fe..30a0031 100755 (executable)
@@ -12,6 +12,8 @@ F_CPU = 16000000
 ############################################################################
 # Below here nothing should be changed...
 
+RESET_TTY_DIR=../reset_tty/
+RESET_TTY=$(RESET_TTY_DIR)reset_tty
 ARDUINO = $(INSTALL_DIR)/hardware/cores/arduino
 AVR_TOOLS_PATH = /usr/bin
 SRC =  $(ARDUINO)/pins_arduino.c $(ARDUINO)/wiring.c \
@@ -114,7 +116,8 @@ lss: applet/$(TARGET).lss
 sym: applet/$(TARGET).sym
 
 # Program the device.  
-upload: applet/$(TARGET).hex
+upload: applet/$(TARGET).hex $(RESET_TTY) 
+       $(RESET_TTY) $(PORT)
        $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)
 
 
@@ -207,4 +210,7 @@ depend:
                >> $(MAKEFILE); \
        $(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE)
 
+$(RESET_TTY): 
+       make -C $(RESET_TTY_DIR)
+
 .PHONY:        all build elf hex eep lss sym program coff extcoff clean depend applet_files sizebefore sizeafter