#!/bin/sh

tinyscheme_opts="-fpic  -I. -c -g -Wno-char-subscripts -O -DUSE_STRLWR=1 -DSTANDALONE=0 -DUSE_DL=0 -DUSE_MATH=0 -DUSE_ASCII_NAMES=0 -DUSE_ERROR_HOOK=1 -DUSE_TRACING=1"


rm -f passdb_slim scheme.o

$target_cc $tinyscheme_opts tinyscheme1.39/scheme.c
$target_cc $target_ccopts -o passdb_slim \
  passdb_slim.c \
  ruleparam_db.c \
  byte_access.c \
  passdb_slim_config.c \
  passdb_slim_debug.c \
  rfid_decoder.c \
  pass_communication.c \
  rules.c \
  ../common/common_defs.c \
  ../common/gpsmath.c \
  ../commhub/commhub.c \
  ../commhub/client_utils.c \
  scheme.o \
  ../common/log_local.c -lm -lz

$target_cc $target_ccopts -o aux/fpeek aux/fpeek.c -lz -lm 

rm -f send_magstripe
$target_cc $target_ccopts -I../common -I../commhub -o aux/send_magstripe aux/send_magstripe.c ../commhub/commhub.c ../common/common_defs.c
