Imported Upstream version 3.2.2
[debian/gnuradio] / gcell / lib / spu / Makefile.am
1 #
2 # Copyright 2008 Free Software Foundation, Inc.
3
4 # This file is part of GNU Radio
5
6 # GNU Radio is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
10
11 # GNU Radio is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #
20
21 # We're building a single .a file from files in several
22 # subdirectories.  We use the "single Makefile, multiple subdirectory"
23 # automake alternative. We're doing this because we're faking out
24 # automake and getting it to build for 2 architectures at the same
25 # time, the PPE (powerpc64) and the SPE.  The easiest way to handle
26 # the SPE was to just build a static library using automake's built in
27 # rules, since trying to get libtool to handle two architectures in
28 # the same tree seemed untenable.
29
30 include $(top_srcdir)/Makefile.common.spu
31
32 IBM_SPU_SYNC_INCLUDES = -I$(top_srcdir)/gcell/ibm/sync/spu_source
33 AM_CPPFLAGS = $(GCELL_SPU_INCLUDES) $(IBM_SPU_SYNC_INCLUDES)
34
35 libspu_LIBRARIES = libgcell_spu.a
36
37 # ----------------------------------------------------------------
38 # files in the lib/runtime/spu directory
39
40 runtime_srcdir = $(srcdir)/../runtime/spu
41
42 runtime_spu_sources = \
43         $(runtime_srcdir)/gc_delay.c \
44         $(runtime_srcdir)/gc_spu_jd_queue.c \
45         $(runtime_srcdir)/spu_buffers.c \
46         $(runtime_srcdir)/gc_logging.c \
47         $(runtime_srcdir)/gc_main.c \
48         $(runtime_srcdir)/gc_random.c
49
50
51 runtime_spu_headers =
52
53 runtime_spu_noinst_headers = \
54         $(runtime_srcdir)/gc_spu_config.h \
55         $(runtime_srcdir)/spu_buffers.h 
56
57 # ----------------------------------------------------------------
58 # files in the lib/general/spu directory
59
60 general_srcdir = $(srcdir)/../general/spu
61
62 general_spu_sources = \
63         $(general_srcdir)/fft_1d_r2.c \
64         $(general_srcdir)/memset.S
65
66 general_spu_headers =
67 # These now live in include/gcell/spu
68 #general_spu_headers = \
69 #       $(general_srcdir)/gc_spu_macs.h \
70 #       $(general_srcdir)/libfft.h
71
72 general_spu_noinst_headers =
73 # As do these
74 #general_spu_noinst_headers = \
75 #       $(general_srcdir)/fft_1d.h \
76 #       $(general_srcdir)/fft_1d_r2.h
77
78 # The QA code for (usually) non-PPE visible support routines in lib/general/spu
79 general_spu_qa_sources = \
80         $(general_srcdir)/qa_memset.c
81
82 # ----------------------------------------------------------------
83 # files in the lib/wrapper/spu directory
84
85 wrapper_srcdir = $(srcdir)/../wrapper/spu
86
87 wrapper_spu_sources = \
88         $(wrapper_srcdir)/gcs_fft_1d_r2.c
89
90 wrapper_spu_headers =
91
92 wrapper_spu_noinst_headers =
93
94 # ----------------------------------------------------------------
95 # build the library from the files in the three directories
96
97 libgcell_spu_a_SOURCES = \
98         $(runtime_spu_sources) \
99         $(general_spu_sources) \
100         $(wrapper_spu_sources)
101
102 gcellspuinclude_HEADERS = \
103         $(runtime_spu_headers) \
104         $(general_spu_headers) \
105         $(wrapper_spu_headers)
106
107 noinst_HEADERS = \
108         $(runtime_spu_noinst_headers) \
109         $(general_spu_noinst_headers) \
110         $(wrapper_spu_noinst_headers)
111
112 # ----------------------------------------------------------------
113 # build some SPU executables
114
115 libspu_PROGRAMS = \
116         gcell_all
117
118 noinst_PROGRAMS = \
119         gcell_runtime_qa \
120         gcell_general_qa
121
122 #
123 # All known non-QA gcell procs (at least until they get too big).
124 #
125 gcell_all_SOURCES = $(wrapper_spu_sources)
126 gcell_all_LDADD = libgcell_spu.a
127
128 #
129 # The QA code required for testing the runtime.
130 #
131 gcell_runtime_qa_SOURCES = $(runtime_srcdir)/gcell_runtime_qa.c
132 gcell_runtime_qa_LDADD = libgcell_spu.a
133
134 #
135 # The QA code required for testing the SPE support routines in lib/general/spu
136 #
137 gcell_general_qa_SOURCES = $(general_spu_qa_sources)
138 gcell_general_qa_LDADD = libgcell_spu.a