view mkoctfile.in @ 2957:17c69c89fe93

[project @ 1997-05-09 18:43:21 by jwe]
author jwe
date Fri, 09 May 1997 18:43:21 +0000
parents 95e85daad148
children 4d275e0a0576
line wrap: on
line source

#! /bin/sh
#
# mkoctfile -- create a .oct file suitable for dynamic linking by
# Octave.

set -e

if [ $# -eq 1 ]; then
  srcfile="$1"
  basnm=`echo $srcfile | sed 's,\.cc$,,'`
  objfile=$basnm.o
  octfile=$basnm.oct
else
  echo "usage: mkoctfile file.cc" 1>&2
  exit 1
fi

# Configuration:  these variables are filled in at configuration time.

CPPFLAGS=%CPPFLAGS%
INCFLAGS=%INCFLAGS%
CXX=%CXX%
CXX_VERSION=%CXX_VERSION%
CXXFLAGS=%CXXFLAGS%
CXXPICFLAG=%CXXPICFLAG%
HOST_CXXFLAGS=%HOST_CXXFLAGS%
NO_IMPLICIT_TEMPLATES=%NO_IMPLICIT_TEMPLATES%
GCC_IEEE_FP_FLAG=%GCC_IEEE_FP_FLAG%

SH_LD=%SH_LD%
SH_LDFLAGS=%SH_LDFLAGS%

ALL_CXXFLAGS="$INCFLAGS $HOST_CXXFLAGS $NO_IMPLICIT_TEMPLATES \
  $GCC_IEEE_FP_FLAG $CXXFLAGS"

echo "making $objfile from $srcfile"

$CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $srcfile -o $objfile

echo "making $octfile from $objfile"

$SH_LD $SH_LDFLAGS -o $octfile $objfile