# Generated automatically from Makeconf.in by configure.
#
# Common configuration rules for all of octave's Makefiles.
#
# John W. Eaton
# jwe@che.utexas.edu
# Department of Chemical Engineering
# The University of Texas at Austin

SHELL = /bin/sh

#### Start of system configuration section. ####

LEX = flex
LFLAGS = -t -I
LEXLIB = 

YACC = bison -y
YFLAGS = -dv

RANLIB = ranlib

RUNTEST = 

DEFAULT_PAGER = less -e

WITH_DLD = false

OCTAVE_LITE = false

# Fortran to C translator and associated flags.

F2C = f2c
F2CFLAGS = 

# Fortran compiler flags.

F77 = 
FFLAGS = -O

# cc and associated flags.

# Clean up INCFLAGS a bit if we are not compiling in a separate
# directory.
ifeq ($(srcdir),.)
  TMP_IF_1 = -I. -I../src
else
  TMP_IF_1 = -I. -I$(srcdir) -I../src
endif
ifeq ($(TOPDIR),$(top_srcdir))
  TMP_IF_2 = -I$(TOPDIR) -I$(TOPDIR)/liboctave -I$(TOPDIR)/src
else
  TMP_IF_2 = -I$(TOPDIR) -I$(TOPDIR)/liboctave -I$(TOPDIR)/src \
	-I$(top_srcdir) -I$(top_srcdir)/liboctave -I$(top_srcdir)/src
endif
INCFLAGS = $(TMP_IF_1) $(TMP_IF_2)

LIBFLAGS = -L$(TOPDIR)

DEFS = -DHAVE_CONFIG_H
UGLY_DEFS =  -DOCTAVE_SOURCE=1 -DSEPCHAR=\':\' -DSEPCHAR_STR=\":\" -DNPSOL_MISSING=1 -DQPSOL_MISSING=1 -DFSQP_MISSING=1 -DHAVE_STRFTIME=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DIEEE_LITTLE_ENDIAN=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DF77_APPEND_UNDERSCORE=1 -DSTDC_HEADERS=1 -DHAVE_ASSERT_H=1 -DHAVE_FLOAT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PWD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_UTSNAME_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_DIRENT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TERMIOS_H=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_GETHOSTNAME=1 -DHAVE_BZERO=1 -DHAVE_BCOPY=1 -DHAVE_RINDEX=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRCASECMP=1 -DHAVE_STRNCASECMP=1 -DHAVE_STRERROR=1 -DHAVE_ATEXIT=1 -DHAVE_ON_EXIT=1 -DHAVE_TEMPNAM=1 -DHAVE_MEMMOVE=1 -DHAVE_PUTENV=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_GETRUSAGE=1 -DHAVE_LIBM=1 -DHAVE_FINITE=1 -DHAVE_ISNAN=1 -DHAVE_ISINF=1 -DHAVE_ACOSH=1 -DHAVE_ASINH=1 -DHAVE_ATANH=1 -DHAVE_ERF=1 -DHAVE_ERFC=1 -DHAVE_LGAMMA=1 -DSIGNGAM_DECLARED=1 -DRETSIGTYPE=void -DSYS_SIGLIST_DECLARED=1 -DHAVE_SYS_SIGLIST=1 

CC = gcc
CFLAGS = -g -O
GCC_IEEE_FP_FLAG = -mieee-fp
ALL_CFLAGS = $(INCFLAGS) $(DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS)
UGLY_ALL_CFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS)
BUG_CFLAGS = $(DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS)


CXX = c++
CXXCPP = c++ -E
CXXFLAGS = -g -O
NO_IMPLICIT_TEMPLATES = -fno-implicit-templates
HOST_CXXFLAGS = 
ALL_CXXFLAGS = $(INCFLAGS) $(DEFS) $(HOST_CXXFLAGS) \
	$(NO_IMPLICIT_TEMPLATES) $(GCC_IEEE_FP_FLAG) $(CXXFLAGS)
UGLY_ALL_CXXFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(HOST_CXXFLAGS) \
	$(NO_IMPLICIT_TEMPLATES) $(GCC_IEEE_FP_FLAG) $(CXXFLAGS)
BUG_CXXFLAGS = $(DEFS) $(HOST_CXXFLAGS) $(NO_IMPLICIT_TEMPLATES) \
	$(GCC_IEEE_FP_FLAG) $(CXXFLAGS)

CPPFLAGS = 

LDFLAGS = -g
LD_STATIC_FLAG = 
ALL_LDFLAGS = $(LIBFLAGS) $(GCC_IEEE_FP_FLAG) $(LD_STATIC_FLAG) $(LDFLAGS)

FLIBS = -lf2c
FLIB_LIST = libf2c.a
FLIB_PATH = 

CXXLIBS =  -lstdc++ -lm -L/usr/lib/gcc-lib/i486-linux/2.7.2 -lstdc++ -lm -lgcc -lc -lgcc
CXXLIB_LIST = libstdc++.a:libm.a:libstdc++.a:libm.a:libgcc.a:libc.a:libgcc.a
CXXLIB_PATH = /usr/lib/gcc-lib/i486-linux/2.7.2


# A shell command to extract the version number from version.h.
getversion = sed -e '/VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q

# The version number.  TOPDIR is something like `.' or `..' or `../..'
# and gets us back up to the top level of the source tree.
version := $(shell $(getversion) $(srcdir)/$(TOPDIR)/src/version.h)

# ==================== Where To Install Things ====================

# The default location for installation.  Everything is placed in
# subdirectories of this directory.  The default values for many of
# the variables below are expressed in terms of this one, so you may
# not need to change them.  This defaults to /usr/local.
prefix = /usr/local

# Like `prefix', but used for architecture-specific files.
exec_prefix = $(prefix)

# Where to install Octave and other binaries that people will want to
# run directly.
bindir = $(exec_prefix)/bin

# Where to install architecture-independent data files.  ${fcnfiledir}
# and ${localfcnfiledir} are subdirectories of this.
datadir = $(prefix)/lib

# Where to install and expect libraries like libcruft.a, liboctave.a,
# and libreadline.a, executable files to be run by Octave rather than
# directly by users, and other architecture-dependent data.
# ${archlibdir} is a subdirectory of this. 
libdir = $(exec_prefix)/lib

# Where to install Octave's include files.  The default is
# ${prefix}/include/octave
includedir = $(prefix)/include/octave

# Where to install Octave's man pages, and what extension they should
# have.  The default is ${prefix}/man/man1
mandir = $(prefix)/man/man1
manext = 1

# Where to install and expect the info files describing Octave..
infodir = $(prefix)/info

# ==================== Octave-specific directories ====================

# These variables hold the values Octave will actually use.  They are
# based on the values of the standard Make variables above.

# Where to install the function file distributed with
# Octave.  This includes the Octave version, so that the
# function files for different versions of Octave will install
# themselves in separate directories.
fcnfiledir = $(datadir)/octave/$(version)/m

# Directories Octave should search for function files specific
# to this site (i.e. customizations), before consulting
# ${fcnfiledir}.  This should be a colon-separated list of
# directories.
localfcnfiledir = $(datadir)/octave/site/m
localfcnfilepath = $(localfcnfiledir)//

# Where to put executables to be run by Octave rather than
# the user.  This path usually includes the Octave version
# and configuration name, so that multiple configurations
# for multiple versions of Octave may be installed at once.
archlibdir = $(libdir)/octave/$(version)/exec/$(target_host_type)

# Where to put object files that will by dynamically loaded.
# This path usually includes the Octave version and configuration
# name, so that multiple configurations for multiple versions of
# Octave may be installed at once. 
octfiledir = $(libdir)/octave/$(version)/oct/$(target_host_type)

# Directories Octave should search for object files that will be
# dynamically loaded and that are specific to this site
# (i.e. customizations), before consulting ${octfiledir}.  This should
# be a colon-separated list of directories.
localoctfiledir = $(datadir)/octave/site/oct/$(target_host_type)
localoctfilepath = $(localoctfiledir)//

# Where Octave will search to find its function files.  Before
# changing this, check to see if your purpose wouldn't
# better be served by changing localfcnfilepath.  This
# should be a colon-separated list of directories.
fcnfilepath = .:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//

# Where Octave will search to find image files.es.
imagedir = $(datadir)/octave/$(version)/imagelib
imagepath = .:$(imagedir)//

# The type of computer we are running on.
target_host_type = i586-unknown-linux

# The following pattern rules and the substitution functions require
# GNU make.  If you don't have it, get it!

# Rules for making C source from Fortran source (if necessary).
#
# If we are using f2c there will be a command for the `%.c : %.f'
# pattern and no command for the `%.o : %.f' pattern, so that make
# will not invoke the fortran compiler by mistake.
#
# If we are not using f2c, it should be ok to have an empty rule for
# the pattern `%.c : %.f', but we don't want to replace make's default
# rule for making object from Fortran source files, so there should be
# no pattern or command for that.

%.c : %.f
	cat $< | $(F2C) $(F2CFLAGS) > $(@F)

%.o : %.f

# How to make .o files from .c files:

.c.o:
	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<

.cc.o:
	$(CXX) -c $(CPPFLAGS) $(ALL_CXXFLAGS) $<

# Here is a rule for generating dependencies for .cc files:

%.d: %.cc
	@echo making $@ from $<
	@rm -f $@
	@-if test "$(srcdir)" = "." ; then \
	  $(CXX) -MM $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \
	    sed -e 's/$*\.o/& $@/g' > $@.tmp ; \
	else \
	  $(CXX) -MM $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \
	    sed -e 's/$*\.o/& $@/g' -e 's,$(srcdir)/,,g' > $@.tmp ; \
	fi
	@mv $@.tmp $@

# And one for .c files.too:

%.d: %.c
	@echo making $@ from $<
	@rm -f $@
	@-if test "$(srcdir)" = "." ; then \
	  $(CC) -MM $(CPPFLAGS) $(ALL_CFLAGS) $< | \
	    sed -e 's/$*\.o/& $@/g' > $@.tmp ; \
	else \
	  $(CC) -MM $(CPPFLAGS) $(ALL_CFLAGS) $< | \
	    sed -e 's/$*\.o/& $@/g' -e 's,$(srcdir)/,,g' > $@.tmp ; \
	fi
	@mv $@.tmp $@
