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