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