Makefile
changeset 17 a7c668003a19
parent 10 faca61cf204c
child 18 79b25e81721f
equal deleted inserted replaced
16:11d6167a67cb 17:a7c668003a19
     2 ASFLAGS = 
     2 ASFLAGS = 
     3 
     3 
     4 AD_PART = m328p
     4 AD_PART = m328p
     5 AD_PROG = arduino
     5 AD_PROG = arduino
     6 AD_BAUD = 57600
     6 AD_BAUD = 57600
     7 AD_PORT = /dev/ttyUSB1
     7 AD_PORT = /dev/ttyUSB0
     8 
     8 
     9 AD = avrdude
     9 AD = avrdude
    10 ADFLAGS = -p $(AD_PART) -c $(AD_PROG) -b $(AD_BAUD) -P $(AD_PORT)
    10 ADFLAGS = -p $(AD_PART) -c $(AD_PROG) -b $(AD_BAUD) -P $(AD_PORT)
    11 
    11 
    12 PROG = console
    12 PROG = led7seg
    13 
    13 
    14 all: $(PROG).s.hex
    14 led7seg.hex: spi.inc led7seg.inc adc.inc delay.inc
    15 
    15 
    16 %.s.hex: %.s
    16 all: $(PROG).hex
       
    17 
       
    18 %.hex: %.s
    17 	$(AS) $(ASFLAGS) $<
    19 	$(AS) $(ASFLAGS) $<
       
    20 	mv $<.hex $@
    18 
    21 
    19 upload: $(PROG).s.hex
    22 upload: $(PROG).hex
    20 	$(AD) $(ADFLAGS) -U flash:w:$(PROG).s.hex
    23 	$(AD) $(ADFLAGS) -U flash:w:$<
    21 
    24 
    22 SERIAL_BAUD = 9600
    25 SERIAL_BAUD = 9600
    23 SERIAL_FLOW = n
    26 SERIAL_FLOW = n
    24 SERIAL_PARITY = n
    27 SERIAL_PARITY = n
    25 SERIAL_BITS = 8
    28 SERIAL_BITS = 8