summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/nds/mk_libnds.sh
blob: 2100e598e31bf1d03a2a33695f951ef60dff4acf (plain) (blame)
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
#!/bin/sh

[ -d "$1" ] || ( echo "usage: $0 <srcdir>"; exit 1 )

cd "$1"

echo "Symlinking assembly files..."
ln -sf icache.s libnds/source/arm9/icache.S
ln -sf dcache.s libnds/source/arm9/dcache.S
ln -sf exceptionHandler.s libnds/source/arm9/exceptionHandler.S
ln -sf biosCalls.s libnds/source/common/biosCalls.S
ln -sf interruptDispatcher.s libnds/source/common/interruptDispatcher.S

echo "Creating font header..."
cat > libnds/include/default_font_bin.h <<EOF
#ifndef default_font_bin_h_
#define default_font_bin_h_

extern void *default_font_bin;
static void *default_font_bin_ptr = &default_font_bin;

#define default_font_bin default_font_bin_ptr

#endif
EOF

echo "Removing socket.h..."
rm -f dswifi/include/sys/socket.h

echo "Patching libnds..."
patch -p0 < patch.libnds

echo "Done."

cd -