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
|
#*
#* 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
#*
X86 = $(shell if ! uname -m | grep ppc ; then echo 1 ; fi)
CROSS_COMPILE = $(shell if ! grep Broadband /proc/cpuinfo ; then echo 1 ; fi)
ifeq "$(X86)" "1"
CROSS ?= /opt/cell/bin/ppu-
EXTRA_CFLAGS = -m32 -mabi=altivec
# RPM defined default flags may not work with this cross-compiler
override OPTFLAGS =
endif
ifeq "$(CROSS_COMPILE)" "1"
SYSROOT ?= ../../../sysroot
prefix ?= /usr
else
prefix ?= /usr/local
endif
SPU_CROSS = spu-
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
speinclude = ${prefix}/spu/include
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 := 2.80
libspe2_A := libspe2.a
libspe2_SO := libspe2.so.${MAJOR_VERSION}.${MINOR_VERSION}
libspe2_SONAME := libspe2.so.${MAJOR_VERSION}
CC := ${CROSS}gcc
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 \
${EXTRA_CFLAGS} ${OPTFLAGS}
SPU_CC = $(SPU_CROSS)gcc
SPU_CFLAGS =
#DEBUG=1
ifdef DEBUG
CFLAGS += -DDEBUG -g
endif
|