source: branches/ffigen-apple-gcc-6465/ffigen4/source/h-to-ffi.sh@ 59

Last change on this file since 59 was 55, checked in by gb, 16 years ago

New.

  • Property svn:executable set to *
File size: 511 bytes
Line 
1#!/bin/sh
2FFIGEN_DIR=`dirname $0`/../ffigen
3CFLAGS="-isystem ${FFIGEN_DIR}/include -quiet -fffigen ${CFLAGS}"
4GEN=${FFIGEN_DIR}/bin/ffigen
5
6
7while [ $# -gt 1 ]
8do
9 case ${1} in
10 -pthread*)
11 CFLAGS="${CFLAGS} -D_REENTRANT"
12 shift
13 ;;
14 -x)
15 shift
16 shift
17 ;;
18 *)
19 CFLAGS="${CFLAGS} ${1}"
20 shift
21 ;;
22 esac
23done
24
25echo +++ ${1}
26mkdir -p .`dirname ${1}`
27OFILE=.`dirname ${1}`/`basename ${1} .h`.ffi
28${GEN} ${CFLAGS} -o ${OFILE} ${1}
29
Note: See TracBrowser for help on using the repository browser.