fixed game logic bug with jumping; fixed demo saving
[awish.git] / 0build.sh
blobe3070e460c19e3d6a7faaf70143514c97ac8e81b
1 #!/bin/sh
3 SDL_FLAGS=`pkg-config sdl --cflags`
4 SDL_LIBS=`pkg-config sdl --libs`
6 SDM_FLAGS=`pkg-config SDL_mixer --cflags`
7 SDM_LIBS=`pkg-config SDL_mixer --libs`
10 linklist=""
12 # $1: infile
13 compile() {
14 ptmp=`basename "$1" .c`
15 pdst="_bld/${ptmp}.o"
16 echo "CC ${ptmp}.o"
17 gcc -pipe -O2 -Wall -std=gnu99 -Isrc ${SDL_FLAGS} ${SDM_FLAGS} -s -c -o "${pdst}" "$1"
18 linklist="${linklist} ${pdst}"
22 # $1: dest
23 link() {
24 echo "LINK $1"
25 gcc -s ${SDL_LIBS} ${SDM_LIBS} -o "$1" ${linklist}
26 chmod 755 "$1"
30 odir=`pwd`
31 mydir=`dirname "$0"`
32 cd "$mydir"
34 rm -rf _bld 2>/dev/null
35 mkdir _bld
38 compile src/vm.c
39 saved_linklist="${linklist}"
40 compile src/awasm.c
41 link awasm
42 linklist="${saved_linklist}"
44 compile src/librnc/librnc.c
45 compile src/libwdx/libwdx.c
47 compile src/resfile.c
48 compile src/video.c
49 compile src/gameglobals.c
50 compile src/mainloop.c
51 compile src/title.c
52 compile src/game.c
53 compile src/polymod.c
54 compile src/awish.c
55 link awish
57 mkdir -p data/code
58 ./awasm asm/awlogic.awa data/code/awish.vmd
60 rm -rf _bld 2>/dev/null
61 cd "$odir"