view Makeconf.in @ 595:a0cc17145462

[project @ 1994-08-09 18:42:23 by jwe]
author jwe
date Tue, 09 Aug 1994 18:42:23 +0000
parents 2349d5721cd9
children b4692246e165
line wrap: on
line source

#
# 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 = @LEX@
LFLAGS = @LFLAGS@
LEXLIB = @LEXLIB@

YACC = @YACC@
YFLAGS = -dv

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

RANLIB = @RANLIB@

RUNTEST = @RUNTEST@

DEFAULT_PAGER = @DEFAULT_PAGER@

# Fortran to C translator and associated flags.

F2C = @F2C@
F2CFLAGS = @F2CFLAGS@

# Fortran compiler flags.

FFLAGS = @FFLAGS@

# 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 = @DEFS@
UGLY_DEFS = @UGLY_DEFS@

CC = @CC@
CFLAGS = @CFLAGS@
GCC_IEEE_FP_FLAG = @GCC_IEEE_FP_FLAG@
ALL_CFLAGS = $(INCFLAGS) $(DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS)
UGLY_ALL_CFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(GCC_IEEE_FP_FLAG) $(CFLAGS)

CXX = @CXX@
CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
EXTERNAL_TEMPLATES = @EXTERNAL_TEMPLATES@
ALL_CXXFLAGS = $(INCFLAGS) $(DEFS) $(EXTERNAL_TEMPLATES) \
	$(GCC_IEEE_FP_FLAG) $(CXXFLAGS)
UGLY_ALL_CXXFLAGS = $(INCFLAGS) $(UGLY_DEFS) $(EXTERNAL_TEMPLATES) \
	$(GCC_IEEE_FP_FLAG) $(CXXFLAGS)

LDFLAGS = @LDFLAGS@
ALL_LDFLAGS = $(LIBFLAGS) $(GCC_IEEE_FP_FLAG) $(LDFLAGS)

FLIBS = @FLIBS@

# A shell command to extract the version number from version.h.
getversion = sed -e '/version_string/!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 = `$(getversion) $(srcdir)/$(TOPDIR)/src/version.h`

# Common prefix for installation directories.
# NOTE: This directory must exist when you start installation.
prefix = /usr/local

# Directory in which to put host dependent programs and libraries
exec_prefix = $(prefix)

# Where to install the executables.
bindir = $(exec_prefix)/bin

# Where to put libraries like libcruft.a, liboctave.a, and libreadline.a
libdir = $(exec_prefix)/lib

# Where octave will look for M-files
libsubdir = $(libdir)/octave/$(version)

# Where to put the manual pages.
mandir = $(prefix)/man/man1
# Extension (not including `.') for the installed manual page filenames.
manext = 1

# Where to put the info files.
infodir = $(prefix)/info

# Where to put extra data files, system-wide startup files, etc.
datadir = $(prefix)/lib/octave

# Where to put installed include files.
includedir = $(prefix)/include/octave

# The type of computer we are running on.
target_host_type = @target_host_type@

# Normally this is the same as $(prefix).  With --run-in-place it is
# $(srcdir).
OCTAVE_HOME = @OCTAVE_HOME@

# These are not used unless RUN_IN_PLACE is defined.
OCTAVE_INFO_DIR = @OCTAVE_INFO_DIR@
OCTAVE_LIB_DIR = @OCTAVE_LIB_DIR@

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

@DEFAULT_DOT_C_FROM_DOT_F@

@DEFAULT_DOT_O_FROM_DOT_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 $@