#
# "$Id: makeinclude.in,v 1.8 2009/10/06 04:17:02 dick Exp $"
# @configure_input@
#
# makeinclude.in for LogProc
# ./makeinclude.in
#
# Copyright 2008 by Dick Balaska and BuckoSoft, Corp.  dick@buckosoft.com
#
#
# This file is included by all of the component's Makefiles to handle 
# common rules
#
# $Log: makeinclude.in,v $
# Revision 1.8  2009/10/06 04:17:02  dick
# Install to /usr/local/sbin and use /usr/local/etc for config files.
#
# Revision 1.7  2009/10/03 21:25:34  dick
# Fix PATH_TO_IPTABLES and add it to config.h.
#
# Revision 1.6  2009/09/28 23:22:25  dick
# Determine and configure iptables usage.
#
# Revision 1.5  2009/09/28 00:01:50  dick
# Remove obsolete BOOSTROOT.
#
# Revision 1.4  2009/09/27 06:07:50  dick
# Dynnamically determine the boost locations using m4 scripts from
# http://www.nongnu.org/autoconf-archive/macros-by-category.html
#
# Revision 1.3  2008/05/27 04:44:12  dick
# UNIX builds define UNIX
#
# Revision 1.2  2008/05/25 07:38:26  dick
# LogProc builds and runs on Linux.
#
# Revision 1.1  2008/05/25 06:04:08  dick
# Linux checkin of LogProc.  Almost builds...
#

# Be quiet when building...
#.SILENT:
@SILENTBUILD@

prefix		=@prefix@
exec_prefix	=@exec_prefix@
bindir		=@bindir@
sbindir		=@sbindir@
datadir		=@datadir@
datarootdir = @datarootdir@
includedir	=@includedir@
libdir		=@libdir@
mandir		=@mandir@
srcdir		=@srcdir@
#VPATH		=@srcdir@
VARRUN		= -DVARRUN=\"@VARRUND@\"
CONF_DIR		= -DCONF_DIR=\"@sysconfdir@\"

VARDIR		=@VARDIR@
LIBDIR		=@prefix@/lib
BINDIR		=@prefix@/bin

# programs we use...
HTMLDOC		=@HTMLDOC@
NROFF		=@NROFF@
ECHO_N		=@ECHO_N@
BROWSER		=@BROWSER@

# compiler names:
CXX		= @CXX@
CC		= @CC@
MAKEDEPEND	= @MAKEDEPEND@

# iptables
DPATH_TO_IPTABLES	= @DPATH_TO_IPTABLES@

# flags for C++ compiler:
BOOST_CPPFLAGS	= @BOOST_CPPFLAGS@
CFLAGS			= @CPPFLAGS@ @CFLAGS@ $(BOOST_CPPFLAGS) -DUNIX
CXXFLAGS		= @CPPFLAGS@ @CXXFLAGS@ $(CONF_DIR) $(BOOST_CPPFLAGS) -DUNIX

# MySQL support
MYSQLFLAG		=@MYSQLFLAG@
MYSQLINC		=@MYSQLINC@
MYSQLLIB		=@MYSQLLIB@

# pass the includes to makedepend
XINCLUDES		=@XINCLUDES@

# which operating system are we building on.
OSFLAG			=@OSFLAG@

# program to make the archive:
#LIBNAME		=@LIBNAME@
#LIBNAME		=$(LIBNAME)
GLLIBNAME		=@GLLIBNAME@
LIBCOMMAND		=@LIBCOMMAND@
RANLIB			=@RANLIB@
DSONAME			=@DSONAME@
GLDSONAME		=@DSONAME@
DSOCOMMAND		=@DSOCOMMAND@

# libraries to link with:
BOOST_LDFLAGS	=@BOOST_LDFLAGS@
BOOST_REGEX_LIB	=@BOOST_REGEX_LIB@
BOOST_THREAD_LIB	= @BOOST_THREAD_LIB@
BOOST_SYSTEM_LIB	= @BOOST_SYSTEM_LIB@
BOOST_PROGRAM_OPTIONS_LIB	= @BOOST_PROGRAM_OPTIONS_LIB@

#XERCES_LIB		= @XERCES_LDFLAGS@
#XERCES_LIB		= -lxerces-c

LDLIBS			=@LDFLAGS@ @LIBS@ $(BOOST_LDFLAGS) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB) -lm  $(BOOST_REGEX_LIB) \
	$(BOOST_PROGRAM_OPTIONS_LIB) $(XERCES_LIB)

LDLIBS			=@LDFLAGS@ @LIBS@  -lboost_thread -lboost_system -lboost_program_options -lboost_regex -lpthread
#GLDLIBS		=@LDFLAGS@ @LIBS@ @GLLIB@ -lX11 -lXext @X_EXTRA_LIBS@ -lm
#LINKFLTK		=-L../lib @LINKFLTK@
#LINKFLTKGL		=-L../lib @LINKFLTKGL@
#IMAGELIBS		=@IMAGELIBS@

# if kde is available, define KDE = kde
KDE			= @KDE@

# Man page extensions...
CAT1EXT		=@CAT1EXT@
CAT3EXT		=@CAT3EXT@

# current version information
#include $(TOP)/xpilot.version

# Build commands and filename extensions...
.SUFFIXES:	.0 .1 .3 .c .cpp .h .fl .man .o .z

.cpp:
	echo Compiling and linking $@  ...
	$(CXX) -I.. $(CXXFLAGS) $< $(LINKFLTK) $(LDLIBS) -o $@

.c.o:
	echo Compiling $@  ...
	$(CC) -I.. $(CFLAGS) -c $<

.cpp.o:
	echo Compiling $< ...
	$(CXX) $(XPCXXFLAGS) $(CXXFLAGS) -c $<

.man.0 .man.1 .man.3:
	echo Formatting $<  ...
	rm -f $@
	$(NROFF) -man $< >$@

.man.z:
	echo Formatting $<  ...
	rm -f $@ t.z
	$(NROFF) -man $< >t
	pack -f t
	mv t.z $@


#
# End of "$Id: makeinclude.in,v 1.8 2009/10/06 04:17:02 dick Exp $".
#
