This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
92 lines (75 loc) · 1.88 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
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
# If you want to build in another directory copy this file there and
# fill in the following values
#
# Prefix of cross toolchain, if anything
# Example: CROSS= powerpc64-unknown-linux-gnu-
#
ARCH = $(shell uname -m)
ifdef CROSS_COMPILE
CROSS ?= $(CROSS_COMPILE)
endif
ifneq ("$(ARCH)", "ppc64")
ifneq ("$(ARCH)", "ppc64le")
ifneq ($(shell which powerpc64-linux-gcc 2> /dev/null),)
CROSS ?= powerpc64-linux-
endif
ifneq ($(shell which powerpc64-linux-gnu-gcc 2> /dev/null),)
CROSS ?= powerpc64-linux-gnu-
endif
endif
endif
#
# Main debug switch
#
DEBUG ?= 0
# Run tests under valgrind?
USE_VALGRIND ?= 1
#
# Optional location of embedded linux kernel file
# This can be a raw vmlinux, stripped vmlinux or
# zImage.epapr
#
KERNEL ?=
#
# Optional build with advanced stack checking
#
STACK_CHECK ?= $(DEBUG)
#
# Experimental (unsupported) build options
#
# Little-endian does not yet build. Include it here to set ELF ABI.
LITTLE_ENDIAN ?= 0
# ELF v2 ABI is more efficient and compact
ELF_ABI_v2 ?= $(LITTLE_ENDIAN)
# Discard unreferenced code and data at link-time
DEAD_CODE_ELIMINATION ?= 0
#
# Where is the source directory, must be a full path (no ~)
# Example: SRC= /home/me/skiboot
#
SRC=$(CURDIR)
#
# Where to get information about this machine (subdir name)
#
#DEVSRC=hdata
#
# default config file, see include config_*.h for more specifics
#
CONFIG := config.h
#
# sfake
#
TARGET = ultra
TARGET_DIRS = $(SRC)/asm $(SRC)/ccan $(SRC)/core $(SRC)/libc \
$(SRC)/platforms $(SRC)/libfdt $(SRC)/svm \
$(SRC)/lib $(SRC)/mbedtls $(SRC)/uv $(SRC)/tss $(SRC)/libstb
OBJS = $(ASM) $(CORE) $(PLATFORMS) $(LIBFDT) $(SVM)
OBJS += $(LIBC) $(CCAN) $(MAIN_MENU) $(LIBCRYPTO) $(LIB)
OBJS += $(MBEDTLS) $(UV) $(TSS)
CLEAN_FILES = *.lis
include $(SRC)/Makefile.main
doxygen:
doxygen doc/doxygen.cfg
%.lst: %.elf
$(call Q,OBJDUMP, $(OBJDUMP) -d -S $< > $@, $@)