-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathm.sh
More file actions
executable file
·45 lines (40 loc) · 748 Bytes
/
Copy pathm.sh
File metadata and controls
executable file
·45 lines (40 loc) · 748 Bytes
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
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -e
FILE_NAME="fdsv3"
# 各種フラグ
ASM_FLG="-g"
LD_FLG="--dbgfile $FILE_NAME.dbg -Ln $FILE_NAME.lbl"
#LD_FLG="--dbgfile $FILE_NAME.dbg"
pack()
{
echo "Packing..."
fdspacker pack $FILE_NAME.json $FILE_NAME.fds
if [ "$?" -ne 0 ]; then
echo "Pakking Error"
fi
}
case "$1" in
"clean")
rm *.o *.fds *.lbl *.dbg
;;
"pack")
pack
;;
"unpack")
echo "UnPacking..."
fdspacker unpack $FILE_NAME.fds unpack
;;
*)
# ビルド日時タイトル表示用
date +"%y%m%d%H%M" > datetime.s
echo "Assembling..."
ca65 $FILE_NAME.s -g $ASM_FLG
if [ "$?" -eq 0 ]; then
echo "Linking..."
ld65 -o $FILE_NAME.bin -C $FILE_NAME.cfg $FILE_NAME.o $LD_FLG
if [ "$?" -eq 0 ]; then
pack
fi
fi
;;
esac