blob: eefbb8215cacb38fe4b4ef41cba775de90d6ec00 (
plain)
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
|
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: tools/build/image.dir/assembler.rules.mk $
#
# IBM CONFIDENTIAL
#
# EKB Project
#
# COPYRIGHT 2016
# [+] International Business Machines Corp.
#
#
# The source code for this program is not published or otherwise
# divested of its trade secrets, irrespective of what has been
# deposited with the U.S. Copyright Office.
#
# IBM_PROLOG_END_TAG
# Makefile that defines how we build .S files
# Currently, we are using power-pc assembler
#
# Macros:
# __GENERATE_ASM_OBJECTRULES: Macro to compiler .S into .o
# Inputs:
# $1 == output path
# $2 == src path
# $3 == target toolchain
define __GENERATE_ASM_OBJECTRULES
.PRECIOUS: $1/%.s
$1/%.o: private LOCALCOMMONFLAGS = $$(basename $($$(@F))_COMMONFLAGS)
$1/%.s: private LOCALCOMMONFLAGS =
$1/%.s : $(2)/%.S
$(C2) " GEN $$(@F)"
$(C1) mkdir -p $1 && $$($(3)_PREFIX)$$(CC) -E $$($$(basename $$(@F))_COMMONFLAGS) -o $$@ $$^
$1/%.o : $1/%.s
$(C2) " GEN $$(@F)"
$(C1) mkdir -p $1 && $$($(3)_PREFIX)$$(AS) $$(ASFLAGS) -o $$@ $$^
endef
|