This repository has been archived by the owner on May 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile
91 lines (81 loc) · 2.28 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
# Reuse the default target
.PHONY: package
package: all
.PHONY: regress
regress: all
.PHONY: cleanup
cleanup: all
.PHONY: flushup
flushup: all
# Make uses /bin/sh by default, ignoring the user's value of SHELL.
# Some systems now ship with /bin/sh pointing at dash, and this Makefile
# requires bash
SHELL = /bin/bash
BINDIR_PREFIX ?= ./
OBJDIR_PREFIX ?= ./
BINDIR := $(BINDIR_PREFIX)bin
OBJDIR := $(OBJDIR_PREFIX)obj
# The default target
.PHONY: all
all:
@echo " Makefile modules: *-*package *-*regress *-*cleanup *-*flushup clean flush help all"
.PHONY: help
help:
@echo ""
@echo " SiFive Freedom Tools - Makefile modules:"
@echo ""
@echo " *-package, *-native-package, *-cross-package"
@echo " Build the binary packages for * repo."
@echo ""
@echo " *-regress, *-native-regress, *-cross-regress"
@echo " Test the prebuilt packages for * repo."
@echo ""
@echo " *-cleanup, *-native-cleanup, *-cross-cleanup"
@echo " Clean the build artifacts for * repo."
@echo ""
@echo " *-flushup, *-native-flushup, *-cross-flushup"
@echo " Flush the build artifacts for * repo."
@echo ""
@echo " clean"
@echo " Remove the obj and bin directories."
@echo ""
@echo " flush"
@echo " Remove the obj directory."
@echo ""
@echo " help"
@echo " Show this help."
@echo ""
@echo " all"
@echo " Show Makefile modules."
@echo ""
@echo " * refers to an item from the package list"
@echo " toolchain-metal"
@echo " binutils-metal"
@echo " gcc-metal"
@echo " gdb-metal"
@echo " qemu"
@echo " sdk-utilities"
@echo " openocd"
@echo " trace-decoder"
@echo " xc3sprog"
@echo ""
@echo " TARGET_BRANCH can be set for a package to"
@echo " override the one in freedom-*.mk files."
@echo ""
# Include Makefiles for all modules
include modules/freedom-binutils-metal/Monorepo.mk
include modules/freedom-gcc-metal/Monorepo.mk
include modules/freedom-gdb-metal/Monorepo.mk
include modules/freedom-toolchain-metal/Monorepo.mk
include modules/freedom-qemu/Monorepo.mk
include modules/freedom-sdk-utilities/Monorepo.mk
include modules/freedom-openocd/Monorepo.mk
include modules/freedom-trace-decoder/Monorepo.mk
include modules/freedom-xc3sprog/Monorepo.mk
# Targets that don't build anything
.PHONY: clean
clean::
rm -rf $(OBJDIR) $(BINDIR)
.PHONY: flush
flush::
rm -rf $(OBJDIR)