File: Makefile

package info (click to toggle)
libspe2 2.2.80-95-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 940 kB
  • ctags: 1,214
  • sloc: ansic: 9,316; makefile: 551; ada: 448; sh: 24
file content (59 lines) | stat: -rw-r--r-- 2,105 bytes parent folder | download
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
#*
#* 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
#*

TOP=..

include $(TOP)/make.defines

MAJOR_VERSION	:= 2
MINOR_VERSION	:= 0.0
EMULATED_LOADER := $(libdir)/spe/emulated-loader.bin

libspebase_A	:= libspebase.a
libspebase_SO	:= libspebase.so.${MAJOR_VERSION}.${MINOR_VERSION}
libspebase_SONAME	:= libspebase.so.${MAJOR_VERSION}

libspebase_OBJS := create.o  elf_loader.o load.o run.o image.o lib_builtin.o \
				default_c99_handler.o default_posix1_handler.o default_libea_handler.o \
				dma.o mbox.o accessors.o info.o

CFLAGS += -I..
CFLAGS += -D_ATFILE_SOURCE

load.o: CPPFLAGS+='-DSPE_EMULATED_LOADER_FILE="$(EMULATED_LOADER)"'

all: $(libspebase_SO) $(libspebase_A)

install-so: $(libspebase_SO) $(libspebase_A)
	$(INSTALL_DIR)	   $(ROOT)$(includedir)
	$(INSTALL_DATA)	   spebase.h	        $(ROOT)$(includedir)/spebase.h
	$(INSTALL_DATA)	   cbea_map.h	        $(ROOT)$(includedir)/cbea_map.h
	$(INSTALL_DIR)	   $(ROOT)$(speinclude)
	$(INSTALL_DATA)	   cbea_map.h	        $(ROOT)$(speinclude)/cbea_map.h

clean:
	rm -rf $(libspebase_A) $(libspebase_OBJS) $(libspebase_SO)

$(libspebase_SO): $(libspebase_OBJS)
	$(CC) $(CFLAGS) -shared -o $@ $^ -lrt -lpthread -Wl,--soname=${libspebase_SONAME}

$(libspebase_A): $(libspebase_OBJS)
	 $(CROSS)ar -r $(libspebase_A) $(libspebase_OBJS)