-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (48 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# Copyright 2014, NICTA
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(NICTA_BSD)
#
# Top level makefile.
# Type "make <thing to build>" in this directory and it will be built.
TFTPROOT = /var/tftpboot/$(USER)
DEFINES += SOS_NFS_DIR='"$(TFTPROOT)"'
ifeq ($(OS), Darwin)
SERIAL_PORT = $(firstword $(wildcard /dev/cu.usbserial-*))
else
SERIAL_PORT = $(firstword $(wildcard /dev/ttyUSB*))
endif
-include .config
lib-dirs:=libs
include tools/common/project.mk
all: app-images
mkdir -p $(TFTPROOT)
cp ./build/arm/imx6/sosh/sosh.bin $(TFTPROOT)/sosh
cp ./build/arm/imx6/my_app/my_app.bin $(TFTPROOT)/my_app
cp ./build/arm/imx6/time_driver/time_driver.bin $(TFTPROOT)/time_driver
cp ./build/arm/imx6/tty_test/tty_test.bin $(TFTPROOT)/tty_test
cp -v $(IMAGE_ROOT)/sos-image-arm-imx6 $(TFTPROOT)/bootimg.elf
$(MAKE) reset
.PHONY: reset
ifeq ($(SERIAL_PORT),)
reset:
@echo "Warning: USB serial port not found." || true
else
reset:
@echo "Resetting sabre @ $(SERIAL_PORT)"
@echo "reset" >> $(SERIAL_PORT)
endif
.PHONY: docs
docs: common
mkdir -p docs
@for doc in $(libdocs-y); \
do \
set -e; \
echo "Building docs for $$doc"; \
$(MAKE) --directory "libs/$$doc" docs; \
cp "libs/$$doc/docs/$$doc.pdf" ./docs; \
done