#!/bin/sh

set -e
 
CPP="$1"	# CPP to use
CC="$2"		# CC to use
FILE="$3"	# source file
OFS="$4"	# destination file
shift
shift
shift
shift
STRUCTS="$*"	# list of structures


$CPP -D__GENOFS__ -Dprivate=public -Dprotected=public $FILE \
	| $BASE/bin/genofs $STRUCTS > $OFS.C
$CC -o $OFS.x $OFS.C
./$OFS.x > $OFS

