Free Hero Mesh

compile at [198a84f8d8]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

File compile artifact b9564d34c1 part of check-in 198a84f8d8


#!/bin/bash --
set -e
if test "$1" = "p"; then
  echo 'Using portable mode.'
  test -d bin || mkdir bin
  export EXE=bin/heromesh
  test -e bin/current.heromeshrc || cp default.heromeshrc bin/current.heromeshrc
fi
test -f CFLAGS || echo xxx > CFLAGS
test "xx$CFLAGS" = "x`cat CFLAGS`" || rm bindings.o class.o picture.o function.o exec.o game.o edit.o picedit.o hash.o || true
echo "x$CFLAGS" > CFLAGS
test "x$EXE" = "x" && export EXE=~/bin/heromesh
echo 'Flags: ' "$CFLAGS"
echo 'Target filename: ' "$EXE"
if test \! \( -f sqlite3.o -a -f sqlite3.h \); then
  if test \! \( -f sqlite3.c -a -f sqlite3.h \); then
    echo '**ERROR**'
    echo 'SQLite files are not found.'
    echo 'Please read the installation/compilation instructions in the README file.'
    exit 1
  fi
  echo '* sqlite3'
  gcc -s -O2 -c -DSQLITE_OMIT_DEPRECATED -DHAVE_MALLOC_USABLE_SIZE -DHAVE_USLEEP -DSQLITE_DQS=0 sqlite3.c
fi
which node > /dev/null || echo 'Node.js not found; ignoring changes to instructions/quarks'
which node > /dev/null || touch -cm instruc.h names.h quarks.h
test instruc -nt instruc.h && node instruc.js > instruc.h
test instruc.js -nt instruc.h && node instruc.js > instruc.h
test names.js -nt names.h && node names.js > names.h
test names.js -nt instruc.h && node instruc.js > instruc.h
test quarks -nt quarks.h && node quarks.js > quarks.h
test quarks.js -nt quarks.h && node quarks.js > quarks.h
test comconfig.h -nt "$EXE" && rm bindings.o class.o picture.o function.o exec.o game.o edit.o picedit.o sound.o || true
test heromesh.h -nt "$EXE" && rm bindings.o class.o picture.o function.o exec.o game.o edit.o picedit.o sound.o || true
test instruc.h -nt "$EXE" && rm class.o exec.o function.o || true
test pcfont.h -nt "$EXE" && rm picture.o || true
test quarks.h -nt "$EXE" && rm bindings.o edit.o exec.o game.o picture.o picedit.o || true
echo '* smallxrm'
test smallxrm.c -nt smallxrm.o && bash smallxrm.c
echo '* bindings'
test bindings.c -nt bindings.o && bash bindings.c
echo '* class'
test class.c -nt class.o && bash class.c
echo '* function'
test function.c -nt function.o && bash function.c
echo '* picture'
test picture.c -nt picture.o && bash picture.c
echo '* exec'
test exec.c -nt exec.o && bash exec.c
echo '* game'
test game.c -nt game.o && bash game.c
echo '* edit'
test edit.c -nt edit.o && bash edit.c
echo '* picedit'
test picedit.c -nt picedit.o && bash picedit.c
echo '* sound'
test sound.c -nt sound.o && bash sound.c
echo '* hash'
test hash.c -nt hash.o && bash hash.c
echo '* main'
bash main.c
echo 'DONE'