~rabbits/nespaint

nespaint/build.sh -rwxr-xr-x 667 bytes
38d4a116Devine Lu Linvega Added gitignore 1 year, 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
#!/bin/bash

# Remove old cart
if test -f "cart.nes"; then
  echo "Removing old cart."
  rm cart.nes
fi

# If asm6 is not built, build it.
if test -f "tools/asm6"; then
  echo "Assembler is ready."
else 
  echo "Compiling assembler."
  tcc tools/asm6.c -o tools/asm6
fi

# If lin6 is not built, build it.
if test -f "tools/lin6"; then
  echo "Linter is ready."
else 
  echo "Compiling linter."
  tcc tools/lin6.c -o tools/lin6
fi

# Lint project
for filename in src/*.asm; do
    [ -e "$filename" ] || continue
   	tools/lin6 -i "$filename"
done

# Build new cart
echo "Assembling new cart."
tools/asm6 src/cart.asm cart.nes

# Run
fceux cart.nes --loadlua debug.lua