]> Pileus Git - ~andy/csm213a-hw/blobdiff - hw2/makefile
Make slave mode configurable
[~andy/csm213a-hw] / hw2 / makefile
index 11824a8e20aa1dd86a22b8b29ef2fa6088ea63da..fef6181cf37059e3ce8b0b7a3eac18ed075289df 100644 (file)
@@ -1,3 +1,5 @@
+-include config.mk
+
 # Common settings
 UART0    = /dev/ttyACM0
 UART1    = /dev/ttyACM1
@@ -7,8 +9,6 @@ CPPFLAGS =
 LDFLAGS  = -lm
 
 # Common rules
-default: all
-
 all: mbed.elf tester.elf control
 
 terms:
@@ -19,15 +19,17 @@ 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 $(UART0) 2
+       @./control $(UART0) 2 sync
 
 # Testing mbed (mbed3)
-tester.elf: tester.o
+tester.elf: tester.o serial_irq.o timer_dma.o messages.o
 
 tester-run: tester.bin install.sh
        @./install.sh $< /dev/sdb /mnt/usb