-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmake.defines
143 lines (116 loc) · 3.24 KB
/
make.defines
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#*
#* libspe2 - A wrapper library to adapt the JSRE SPU usage model to SPUFS
#* Copyright (C) 2005 IBM Corp.
#*
#* This library is free software; you can redistribute it and/or modify it
#* under the terms of the GNU Lesser General Public License as published by
#* the Free Software Foundation; either version 2.1 of the License,
#* or (at your option) any later version.
#*
#* This library is distributed in the hope that it will be useful, but
#* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
#* License for more details.
#*
#* You should have received a copy of the GNU Lesser General Public License
#* along with this library; if not, write to the Free Software Foundation,
#* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#*
# USER CONFIGURATION
# ARCH: target architecture
# undefined: compiler's default architecture
# ppc: 32-bit PowerPC
# ppc64: 64-bit PowerPC
# Default value:
# ARCH =
# DEBUG: enable debugging
# 1: enable
# others: disable
# Default value:
# DEBUG =
# TEST_STATIC: set static libraries as test targets
# 1: test static libraries
# others: test shared libraries
#
# Default value:
# TEST_STATIC =
# CROSS: prefix of PPU toolchain
#
# Default:
#
# (native build)
# CROSS =
# (cross build)
# CROSS = ppu-
# SPU_CROSS: prefix of SPU toolchain
#
# Default:
# SPU_CROSS = spu-
BUILD_ARCH = $(shell uname -m)
ifneq "$(BUILD_ARCH)" "ppc"
ifneq "$(BUILD_ARCH)" "ppc64"
CROSS_COMPILE = 1
endif
endif
ifeq "$(CROSS_COMPILE)" "1"
CROSS ?= ppu-
# RPM defined default flags may not work with this cross-compiler
override OPTFLAGS =
SYSROOT ?= ../../../sysroot
prefix ?= /usr
RPM_ARCH ?= noarch
else
prefix ?= /usr/local
RPM_ARCH ?= $(ARCH)
endif
ifeq "$(RPM_ARCH)" ""
RPM_ARCH = ppc
endif
ifeq "$(ARCH)" "ppc"
ARCH_CFLAGS = -m32 -mabi=altivec
else
ifeq "$(ARCH)" "ppc64"
ARCH_CFLAGS = -m64
else
# Use default
ARCH_CFLAGS =
endif
endif
SPU_CROSS = spu-
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
speinclude = ${prefix}/spu/include
spe_ld_dir = ${libdir}/spe/
adabindingdir = ${prefix}/adainclude
DESTDIR :=
ROOT := ${DESTDIR}${SYSROOT}
INSTALL := /usr/bin/install -c
INSTALL_PROGRAM := ${INSTALL} -m 755
INSTALL_DATA := ${INSTALL} -m 644
INSTALL_LINK := ln -sf
INSTALL_DIR := ${INSTALL} -d -m 755
MAJOR_VERSION := 2
MINOR_VERSION := 3.0
libspe2_A := libspe2.a
libspe2_SO := libspe2.so.${MAJOR_VERSION}.${MINOR_VERSION}
libspe2_SONAME := libspe2.so.${MAJOR_VERSION}
CC := ${CROSS}gcc
EMBEDSPU := $(CROSS)embedspu
CTAGS := ctags
CFLAGS := -O2 -Wall -I. -fPIC -I$(TOP)/include -fexceptions -std=gnu99 \
-Wformat -Wdisabled-optimization \
-Wundef -Wshadow -Wcast-align -Wwrite-strings \
-Wmissing-prototypes -Wmissing-declarations \
-Wmissing-noreturn -Wredundant-decls \
-Wnested-externs -Winline -Wformat \
${ARCH_CFLAGS} ${EXTRA_CFLAGS} ${OPTFLAGS}
ifeq "$(TEST_STATIC)" "1"
TEST_LDFLAGS += -static
endif
SPU_CC = $(SPU_CROSS)gcc
SPU_CFLAGS =
ifdef DEBUG
CFLAGS += -DDEBUG -g
endif