~rabbits/dexe

ref: 9f0a98f597f3a89a43e67efdbe20391a751abe21 dexe/build.sh -rwxr-xr-x 948 bytes
9f0a98f5neauoire Converted to TAL format 4 months ago
                                                                                
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
#!/usr/bin/env bash

# format code
# clang-format -i dexe.c

# remove old
# rm ./dexe

# debug(slow)
# cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined dexe.c -L/usr/local/lib -lSDL2 -o dexe

# build(fast)
# cc dexe.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -L/usr/local/lib -lSDL2 -o dexe

# Size
# echo "Size: $(du -sk ./dexe)"

# Install
# if [ -d "$HOME/bin" ] && [ -e ./dexe ]
# then
	# cp ./dexe $HOME/bin
    # echo "Installed: $HOME/bin" 
# fi

# run
# ./dexe example.chr
# ./dexe example.bmp


echo "Cleaning.."
rm -rf bin
mkdir bin

echo "Assembling.."
uxnasm dexe.tal bin/dexe.rom 

echo "Installing.."
if [ -d "$HOME/roms" ] && [ -e ./bin/dexe.rom ]
then
	cp ./bin/dexe.rom $HOME/roms
    echo "Installed in $HOME/roms" 
fi

echo "Running.."
uxnemu bin/dexe.rom