#
# make.config.in  -  Master makefile configuration for netboot
#
# Copyright (C) 2003-2007 Gero Kuhlmann   <gero@gkminix.han.de>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: make.config.in,v 1.21 2007/02/01 12:09:18 gkminix Exp $
#


# Major installation directory names
prefix       = @prefix@
exec_prefix  = @exec_prefix@
datarootdir  = @datarootdir@
bindir       = @bindir@
sbindir      = @sbindir@
mandir       = @mandir@
sysconfdir   = @sysconfdir@
statedir     = @localstatedir@
libdir       = @libdir@
includedir   = @includedir@
datadir      = @datadir@


# Additional netboot installation directory and file names
nblibdir     = @nblibdir@
nbdatadir    = @nbdatadir@
nbbindir     = $(nbdatadir)/binaries
nbnetdrvdir  = $(nbdatadir)/netdrvr
nbmiscdir    = $(nbdatadir)/misc
nbconfig     = @CONFIGFILE@
nbdatabase   = //netboot.db


# Top directories of source and build tree
top_srcdir   = @abs_top_srcdir@
top_builddir = @abs_top_builddir@


# Source directories
TOPDIR       = $(top_srcdir)
ROMDIR       = $(TOPDIR)/bootrom
INCDIR       = $(TOPDIR)/include
MISCDIR      = $(TOPDIR)/misc
LIBDIR       = $(TOPDIR)/nblib
I386DIR      = $(TOPDIR)/i386
MODSRCDIR    = $(TOPDIR)/$(MODNAME)
SCRIPTDIR    = $(MISCDIR)/ldscripts
RULESDIR     = $(MISCDIR)/rules
CONFSUBDIRS  = @CONFSUBDIRS@
TOOLSUBDIRS  = @TOOLSUBDIRS@
VPATH        = $(INCDIR):$(MODSRCDIR)


# Directory where to store the bootrom binary files
bindestdir   = $(ROMDIR)/binaries


# Define utility path names
CPATTR       = cp


# Define host program path names
CC           = @CC@
CPP          = @CPP@
YACC         = @YACC@
LEX          = @LEX@


# Define target program path names
GCC86        = @GCC86@
CPP86        = @CPP86@
GAS86        = @GAS86@
GLD86        = @GLD86@


# Define utility program path names
AR           = @AR@
RANLIB       = @RANLIB@
LIBTOOL      = @LIBTOOL@
AWK          = @AWK@
SHELL        = @SHELL@
INSTALL      = @INSTALL@
INSTALL_PROGRAM	= @INSTALL_PROGRAM@
INSTALL_SCRIPT	= @INSTALL_SCRIPT@
INSTALL_DATA	= @INSTALL_DATA@


# Define flags for the host environment
CDEBUG       = # -g
NBLIBOBJS    = @LIBOBJS@
INCLUDE      = $(patsubst %,-I%,$(subst :, ,$(VPATH)))
CDEFS        = @DEFS@ -DNETBOOT
CFLAGS       = @CFLAGS@ $(CDEBUG) $(CDEFS) $(INCLUDE)
LDFLAGS      = -s
SYSLIBS      = @LIBS@
BDBLIB       = @BDBLIB@
ODBCLIB      = @ODBCLIB@
LZOLIB       = @LZOLIB@
LEXLIB       = @LEXLIB@
LIBS         = -L$(LIBDIR) -lnb $(SYSLIBS)
YFLAGS       = -d
LFLAGS       =
ARFLAGS      = ruv
LIBTOOLDEPS  = @LIBTOOL_DEPS@


# Special flags for different source files
BDB_FLAGS    =
ODBC_FLAGS   = @ODBC_FLAGS@
LZO_FLAGS    = @LZO_FLAGS@


# Define the root file names for LEX and YACC
YROOT        = y.tab
LROOT        = @LEX_OUTPUT_ROOT@


# Define flags for the target environment
GNU16BIT     = @GNU16BIT@
GNUELF       = @GNUELF@
CPP86INCS    = -nostdinc -I$(INCDIR) -I$(TOPDIR)/$(MODNAME)
CPP86SFLAGS  = -x assembler-with-cpp -traditional-cpp -C -P @DEFS@ \
		-D_ASSEMBLY_ -D_TARGET_ $(BOOTROM)
CPP86CFLAGS  = -x c @DEFS@ -D_TARGET_ $(BOOTROM)
GCC86FLAGS   = -Os -march=i386 $(CPP86CFLAGS) -Wall -Winline \
		-mpreferred-stack-boundary=2 -mregparm=1 \
		-ffreestanding -fpack-struct -fshort-enums \
		-fleading-underscore -fcall-used-ecx -fcall-used-edx \
		@GCC86_TARGET_FLAGS@
GLD86LIBS    = -L$(I386DIR) -li386
GLD86FLAGS   = @GLD86_TARGET_FLAGS@ -nostdlib
GAS86FLAGS   = @GAS86_TARGET_FLAGS@

