]> Pileus Git - ~andy/csm213a-hw/blob - hw2/makefile
Bring in utilities to tester
[~andy/csm213a-hw] / hw2 / makefile
1 # Common settings
2 UART0    = /dev/ttyACM0
3 UART1    = /dev/ttyACM1
4 CLEAN    = control tags
5
6 CPPFLAGS =
7 LDFLAGS  = -lm
8
9 # Common rules
10 default: mbed-run
11
12 all: mbed.elf tester.elf control
13
14 terms:
15         test -c $(UART0) && term $(UART0) &
16         test -c $(UART1) && term $(UART1) &
17
18 dist:
19         zip mbed.zip makefile ../common.mk *.{c,cpp,h} */*.{cpp,.h}
20
21 # Primary mbed (mbed1/mbed2)
22 mbed.elf: main.o serial_irq.o serial_dma.o timer_dma.o messages.o
23
24 mbed-run: mbed.bin control install.sh
25         @./install.sh $<
26         @./control $(UART0) 1
27         @./control $(UART1) 2 sync
28
29 # Testing mbed (mbed3)
30 tester.elf: tester.o serial_irq.o timer_dma.o messages.o
31
32 tester-run: tester.bin install.sh
33         @./install.sh $< /dev/sdb /mnt/usb
34
35 # Controls programs
36 control: control.c messages.h
37         gcc -Wall -o $@ $<
38
39 -include ../config.mk
40 -include ../common.mk