]> Pileus Git - ~andy/csm213a-hw/blobdiff - hw2/makefile
Make control script more configurable
[~andy/csm213a-hw] / hw2 / makefile
index aba2af875cb9ac92d1d3250800def469a482257f..36f60c86d70f0e8370bd42c8c656c2588b928440 100644 (file)
@@ -1,3 +1,5 @@
+-include config.mk
+
 # Common settings
 UART0    = /dev/ttyACM0
 UART1    = /dev/ttyACM1
@@ -7,9 +9,7 @@ CPPFLAGS =
 LDFLAGS  = -lm
 
 # Common rules
-default: mbed-run
-
-all: mbed.elf tester.elf control
+all: mbed.bin tester.bin control
 
 terms:
        test -c $(UART0) && term $(UART0) &
@@ -19,12 +19,14 @@ dist:
        zip mbed.zip makefile ../common.mk *.{c,cpp,h} */*.{cpp,.h}
 
 # Primary mbed (mbed1/mbed2)
-mbed.elf: main.o serial_irq.o serial_dma.o timer_dma.o messages.o
+mbed.elf: main.o main_time.o main_emit.o main_comm.o \
+       serial_irq.o serial_dma.o timer_dma.o messages.o
 
 mbed-run: mbed.bin control install.sh
        @./install.sh $<
-       @./control $(UART0) 1
-       @./control $(UART1) 2 sync
+       @./control -d1    $(UART0)
+       @./control -d2    $(UART0)
+       @./control -d2 -y $(UART0)
 
 # Testing mbed (mbed3)
 tester.elf: tester.o serial_irq.o timer_dma.o messages.o