-
Notifications
You must be signed in to change notification settings - Fork 45
/
makefile
112 lines (90 loc) · 2.79 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#############################################################################
# CoreSight Access Library
#
# Copyright (C) ARM Limited, 2017. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#############################################################################
#
# Master makefile - calls to build library and demos.
#
# setup architecture & x-compile
include makefile-arch.inc
# export architecture info
export $(ARCH)
export $(PLAT_ARCH)
###### library build targets ##################################
#### builders....
.PHONY: all
all: start lib demos
start:
@echo "CoreSight Access Library - building libraries and demos"
@echo "Using ARCH=$(ARCH), CROSS_COMPILE=$(CROSS_COMPILE)"
@echo "MAKEFLAGS = $(MAKEFLAGS)"
@echo ""
.PHONY: lib
lib:
cd ./build && make
.PHONY: demos
demos:
ifeq ($(BAREMETAL),1)
@echo "** Not building demos in BAREMETAL configuration"
else
cd ./demos && make
endif
.PHONY: experimental
experimental:
cd ./experimental && make
.PHONY: python
python:
cd ./python && make
#### cleaners...
.PHONY: clean
clean: lib_clean demos_clean
.PHONY: lib_clean
lib_clean:
cd ./build && make clean
.PHONY: demos_clean
demos_clean:
cd ./demos && make clean
.PHONY: experimental_clean
experimental_clean:
cd ./experimental && make clean
.PHONY: python_clean
python_clean:
cd ./python && make clean
#### rebuild
.PHONY: rebuild
rebuild: clean all
###### library maintenance operaions ##################################
# CS Lib API Documentation
.PHONY: docs
docs: doxygen-cfg.txt
doxygen doxygen-cfg.txt
# create a source distribution file.
libsources = ./source ./include ./build/makefile ./build/readme_buildlib.md
demosources = ./demos/*.c ./demos/*.h ./demos/makefile ./demos/readme_demos.md ./demos/*.py ./demos/juno_demo_setup/*.* ./demos/makefile.snapshot
pythonsources = ./python/*.py ./python/makefile ./python/readme_python.md ./python/csaccess.i
exprsources = ./experimental/*.c ./experimental/*.h ./experimental/*.py ./experimental/makefile
rootsources = doxygen-cfg.txt README.md LICENSE makefile *.py makefile-arch.inc make-info.txt
sources = $(libsources) $(demosources) $(pythonsources) $(rootsources)
distfile = csaccess.tar.gz
.PHONY: dist
dist: $(distfile)
$(distfile): $(sources)
tar -czf $@ $^
tar -tzf $@
.PHONY: help
help:
@cat make-info.txt