source: rtems/c/src/lib/libbsp/arm/nds/Makefile.am @ 12d853d

4.104.11
Last change on this file since 12d853d was 12d853d, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 14, 2008 at 8:04:36 PM

2008-09-14 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac: Split out bsp_cleanup() and bsp_get_work_area() into their own files.
  • startup/bspclean.c, startup/bspgetworkarea.c, startup/bspstart.c: New files.
  • startup/start.c: Removed.
  • Property mode set to 100644
File size: 9.6 KB
Line 
1##
2## $Id$
3##
4
5ACLOCAL_AMFLAGS = -I ../../../../aclocal
6
7SUBDIRS = . tools
8
9include $(top_srcdir)/../../../../automake/compile.am
10include $(top_srcdir)/../../bsp.am
11
12dist_project_lib_DATA = bsp_specs
13
14include_HEADERS = include/bsp.h
15include_HEADERS += include/tm27.h
16
17nodist_include_HEADERS = include/bspopts.h
18nodist_include_HEADERS += ../../shared/include/coverhd.h
19
20DISTCLEANFILES = include/bspopts.h
21noinst_PROGRAMS =
22
23EXTRA_DIST = start/start.S
24start.$(OBJEXT): start/start.S
25        $(CPPASCOMPILE) -o $@ -c $<
26project_lib_DATA = start.$(OBJEXT)
27
28dist_project_lib_DATA += startup/linkcmds
29
30include_rtemsdir = $(includedir)/rtems
31include_rtems_HEADERS = fb/fb.h touchscreen/touchscreen.h sound/sound.h
32
33noinst_PROGRAMS += startup.rel
34startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
35    startup/bspstart.c startup/bspclean.c startup/bspgetworkarea.c \
36    ../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
37    ../../shared/bootcard.c
38startup_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
39startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
40
41noinst_PROGRAMS += gnatsupp.rel
42gnatsupp_rel_SOURCES = ../../shared/gnatinstallhandler.c
43gnatsupp_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
44gnatsupp_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
45
46noinst_PROGRAMS += clock.rel
47clock_rel_SOURCES = clock/clock.c
48clock_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
49clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
50
51noinst_PROGRAMS += rtc.rel
52rtc_rel_SOURCES = rtc/rtc.c ../../shared/tod.c
53rtc_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
54rtc_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
55
56noinst_PROGRAMS += console.rel
57console_rel_SOURCES = console/console.c
58console_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -I$(srcdir)/include
59console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
60
61noinst_PROGRAMS += fb.rel
62fb_rel_SOURCES = fb/fb.c
63fb_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
64fb_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
65
66noinst_PROGRAMS += touchscreen.rel
67touchscreen_rel_SOURCES = touchscreen/touchscreen.c touchscreen/parser.c \
68                          touchscreen/reco.c
69touchscreen_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
70touchscreen_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
71
72noinst_PROGRAMS += timer.rel
73timer_rel_SOURCES = timer/timer.c
74timer_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
75timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
76
77noinst_PROGRAMS += sound.rel
78sound_rel_SOURCES = sound/sound.c
79sound_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
80sound_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
81
82noinst_PROGRAMS += block.rel
83block_rel_SOURCES = block/block.c
84block_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -DNDS -I$(srcdir)/libfat/source/disc_io
85block_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
86
87include_HEADERS += irq/irq.h
88
89noinst_PROGRAMS += irq.rel
90irq_rel_SOURCES = irq/irq.c
91irq_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
92irq_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
93
94if HAS_NETWORKING
95noinst_PROGRAMS += wifi.rel
96wifi_rel_SOURCES =      wifi/wifi.c                                     \
97                        wifi/compat.c
98wifi_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/dswifi/include -I$(srcdir)/libnds/include -I$(srcdir)/dswifi/include -D_KERNEL
99wifi_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
100endif
101
102# libnds, ARM9 side
103noinst_PROGRAMS += libnds9.rel
104bin2s:  $(srcdir)/tools/bin2s.c
105        cc -o $(srcdir)/tools/bin2s $(srcdir)/tools/bin2s.c
106
107SUFFIXES = .bin
108
109%.s:    %.bin bin2s
110        $(srcdir)/tools/bin2s $< > $(srcdir)/$@
111
112libnds9_rel_SOURCES =   libnds/source/common/biosCalls.S                \
113                        libnds/source/common/card.c                     \
114                        libnds/source/common/gbfs.c                     \
115                        libnds/source/common/interruptDispatcher.S      \
116                        libnds/source/common/interrupts.c               \
117                        libnds/source/arm9/boxtest.c                    \
118                        libnds/source/arm9/default_font.S               \
119                        libnds/source/arm9/console.c                    \
120                        libnds/source/arm9/COS.S                        \
121                        libnds/source/arm9/dcache.S                     \
122                        libnds/source/arm9/exceptionHandler.S           \
123                        libnds/source/arm9/exceptions.c                 \
124                        libnds/source/arm9/gurumeditation.c             \
125                        libnds/source/arm9/icache.S                     \
126                        libnds/source/arm9/image.c                      \
127                        libnds/source/arm9/initSystem.c                 \
128                        libnds/source/arm9/keys.c                       \
129                        libnds/source/arm9/ndsmotion.c                  \
130                        libnds/source/arm9/pcx.c                        \
131                        libnds/source/arm9/rumble.c                     \
132                        libnds/source/arm9/SIN.S                        \
133                        libnds/source/arm9/sound.c                      \
134                        libnds/source/arm9/system.c                     \
135                        libnds/source/arm9/TAN.S                        \
136                        libnds/source/arm9/touch.c                      \
137                        libnds/source/arm9/video.c                      \
138                        libnds/source/arm9/videoGL.c
139libnds9_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -I$(srcdir)/include
140libnds9_rel_CCASFLAGS = $(AM_CCASFLAGS) -DARM9 -I$(srcdir)/libnds/include
141libnds9_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
142
143if HAS_NETWORKING
144# dswifi, ARM9 side
145noinst_PROGRAMS += dswifi9.rel
146dswifi9_rel_SOURCES =   dswifi/arm9/source/wifi_arm9.c                  \
147                        dswifi/common/source/spinlock.S
148dswifi9_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/dswifi/include -I$(srcdir)/libnds/include -I$(srcdir)/dswifi/common/source -I$(srcdir)/wifi -D_KERNEL -Dcaddr_t=uint32_t
149dswifi9_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
150endif
151
152# dldi
153noinst_PROGRAMS += libdldi.rel
154libdldi_rel_SOURCES =   libfat/source/disc_io/disc.c                    \
155                        libfat/source/disc_io/io_cf_common.c            \
156                        libfat/source/disc_io/io_efa2.c                 \
157                        libfat/source/disc_io/io_fcsr.c                 \
158                        libfat/source/disc_io/io_m3cf.c                 \
159                        libfat/source/disc_io/io_m3_common.c            \
160                        libfat/source/disc_io/io_m3sd.c                 \
161                        libfat/source/disc_io/io_mpcf.c                 \
162                        libfat/source/disc_io/io_njsd.c                 \
163                        libfat/source/disc_io/io_nmmc.c                 \
164                        libfat/source/disc_io/io_sccf.c                 \
165                        libfat/source/disc_io/io_sc_common.c            \
166                        libfat/source/disc_io/io_scsd.c                 \
167                        libfat/source/disc_io/io_sd_common.c            \
168                        libfat/source/disc_io/io_dldi.S                 \
169                        libfat/source/disc_io/io_scsd_s.S
170libdldi_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include -I$(srcdir)/libfat/source/disc_io
171libdldi_rel_CCASFLAGS = $(AM_CCASFLAGS) -DARM9 -I$(srcdir)/libnds/include -I$(srcdir)/libfat/source/disc_io
172libdldi_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
173
174# libnds, ARM7 side
175noinst_PROGRAMS += libnds7.rel
176libnds7_rel_SOURCES =   libnds/source/common/biosCalls.S                \
177                        libnds/source/common/card.c                     \
178                        libnds/source/common/gbfs.c                     \
179                        libnds/source/common/interruptDispatcher.S      \
180                        libnds/source/common/interrupts.c               \
181                        libnds/source/arm7/audio.c                      \
182                        libnds/source/arm7/clock.c                      \
183                        libnds/source/arm7/microphone.c                 \
184                        libnds/source/arm7/spi.c                        \
185                        libnds/source/arm7/touch.c                      \
186                        libnds/source/arm7/userSettings.c
187libnds7_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM7 -I$(srcdir)/libnds/include
188libnds7_rel_CFLAGS = -mcpu=arm7tdmi -msoft-float
189libnds7_rel_CCASFLAGS = -mcpu=arm7tdmi -msoft-float
190libnds7_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
191
192if HAS_NETWORKING
193# dswifi, ARM7 side
194noinst_PROGRAMS += dswifi7.rel
195dswifi7_rel_SOURCES =   dswifi/arm7/source/wifi_arm7.c                  \
196                        dswifi/common/source/spinlock.S
197dswifi7_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM7 -I$(srcdir)/dswifi/include -I$(srcdir)/libnds/include -I$(srcdir)/dswifi/common/source
198dswifi7_rel_CFLAGS = -mcpu=arm7tdmi -msoft-float
199dswifi7_rel_CCASFLAGS = -mcpu=arm7tdmi -msoft-float
200dswifi7_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
201endif
202
203# include libnds to dist so the user program can include it
204include_libndsdir = $(includedir)/libnds
205include_libnds_HEADERS =        libnds/include/gbfs.h                   \
206                                libnds/include/nds.h
207
208include_libndsndsdir = $(includedir)/libnds/nds
209include_libndsnds_HEADERS =     libnds/include/nds/memory.h             \
210                                libnds/include/nds/system.h             \
211                                libnds/include/nds/bios.h               \
212                                libnds/include/nds/registers_alt.h      \
213                                libnds/include/nds/interrupts.h         \
214                                libnds/include/nds/card.h               \
215                                libnds/include/nds/ipc.h                \
216                                libnds/include/nds/timers.h             \
217                                libnds/include/nds/dma.h                \
218                                libnds/include/nds/reload.h             \
219                                libnds/include/nds/jtypes.h
220
221include_libndsnds9dir = $(includedir)/libnds/nds/arm9
222include_libndsnds9_HEADERS =    libnds/include/nds/arm9/ndsmotion.h     \
223                                libnds/include/nds/arm9/pcx.h           \
224                                libnds/include/nds/arm9/input.h         \
225                                libnds/include/nds/arm9/math.h          \
226                                libnds/include/nds/arm9/console.h       \
227                                libnds/include/nds/arm9/sprite.h        \
228                                libnds/include/nds/arm9/videoGL.h       \
229                                libnds/include/nds/arm9/cache.h         \
230                                libnds/include/nds/arm9/image.h         \
231                                libnds/include/nds/arm9/trig_lut.h      \
232                                libnds/include/nds/arm9/video.h         \
233                                libnds/include/nds/arm9/exceptions.h    \
234                                libnds/include/nds/arm9/rumble.h        \
235                                libnds/include/nds/arm9/background.h    \
236                                libnds/include/nds/arm9/boxtest.h       \
237                                libnds/include/nds/arm9/postest.h       \
238                                libnds/include/nds/arm9/sound.h
239
240include_libndsnds7dir = $(includedir)/libnds/nds/arm7
241include_libndsnds7_HEADERS =    libnds/include/nds/arm7/serial.h        \
242                                libnds/include/nds/arm7/audio.h         \
243                                libnds/include/nds/arm7/clock.h         \
244                                libnds/include/nds/arm7/touch.h
245EXTRA_DIST += coproc/coproc.S coproc/coproc.c
246if HAS_NETWORKING
247coproc.bin: coproc/coproc.S coproc/coproc.c libnds7.rel dswifi7.rel
248        @CC@ -o coproc.elf -mcpu=arm7tdmi -msoft-float -O2 -DARM7 -I$(srcdir)/libnds/include -I$(srcdir)/dswifi/include -DENABLE_WIFI -T $(srcdir)/coproc/coproc.ld $^ -lc
249        $(OBJCOPY) -O binary coproc.elf coproc.bin
250else
251coproc.bin: coproc/coproc.S coproc/coproc.c libnds7.rel
252        @CC@ -o coproc.elf -mcpu=arm7tdmi -msoft-float -O2 -DARM7 -I$(srcdir)/libnds/include -T $(srcdir)/coproc/coproc.ld $^ -lc
253        $(OBJCOPY) -O binary coproc.elf coproc.bin
254endif
255project_lib_DATA += coproc.bin
256
257noinst_LIBRARIES = libbsp.a
258libbsp_a_SOURCES =
259libbsp_a_LIBADD = clock.rel console.rel gnatsupp.rel startup.rel irq.rel \
260    timer.rel libnds9.rel rtc.rel fb.rel touchscreen.rel sound.rel \
261    block.rel libdldi.rel
262
263if HAS_NETWORKING
264    libbsp_a_LIBADD += wifi.rel dswifi9.rel
265endif
266
267include $(srcdir)/preinstall.am
268include $(top_srcdir)/../../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.