
# What are we building anyway?
PACKAGE			= @PACKAGE@
VERSION			= @VERSION@

# Directory settings
prefix			= @prefix@
exec_prefix		= $(prefix)
sharedir		= $(prefix)/share

docdir			= $(sharedir)/doc/$(PACKAGE)
copyingfile		= $(docdir)/copyright
infodir			= @infodir@

datadir			= @datadir@
localedir		= $(datadir)/locale
bindir			= @bindir@
sbindir			= @sbindir@

libdir			= @libdir@
dpkglibdir		= $(libdir)/$(PACKAGE)
dpkgsharedir		= $(sharedir)/$(PACKAGE)

methodsdir		= $(dpkglibdir)/methods
parsechangelogdir	= $(dpkglibdir)/parsechangelog

admindir		= @admindir@

mandir			= @mandir@
man1dir			= $(mandir)/man1
man5dir			= $(mandir)/man5
man8dir			= $(mandir)/man8

sysconfdir		= @sysconfdir@
dpkgconfdir		= $(sysconfdir)/$(PACKAGE)
alternativesdir		= $(sysconfdir)/alternatives

abs_builddir		= @abs_builddir@
abs_top_srcdir		= @abs_top_srcdir@
ifeq ($(strip $(srcdir)),$(strip $(top_srcdir)))
subdir =
else
subdir = $(patsubst $(top_srcdir)/%,%,$(srcdir))/
endif
PERL			= @PERL@
mkinstalldirs		= $(SHELL) $(top_srcdir)/mkinstalldirs
LN			= @LN_S@
INSTALL			= @INSTALL@
INSTALL_PROGRAM		= @INSTALL_PROGRAM@
INSTALL_DATA		= @INSTALL_DATA@
INSTALL_SCRIPT		= @INSTALL_SCRIPT@
SED			= @SED@
RM			= @RM@

CC			= @CC@
CFLAGS			= @CFLAGS@ @CWARNS@

CXX			= @CXX@
CXXFLAGS		= @CXXFLAGS@

CPPFLAGS		= @CPPFLAGS@
LD			= @LD@
LDFLAGS			= @LDFLAGS@ -L../lib -L../optlib
LIBS			= @LIBS@ -ldpkg -lopt $(ZLIB_LIBS) $(BZ2LIB_LIBS)

RANLIB			= @RANLIB@

DEFS			= @DEFS@ -D_GNU_SOURCE
INCLUDE_CFLAGS		= -I$(top_srcdir)/include -I$(top_srcdir) -I$(srcdir) -I../include -I.. -I. -I$(top_srcdir)/optlib

NLS_CFLAGS		= -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl -I../intl
NLS_LIBS		= @INTLLIBS@ 

SSD_LIBS		= @SSD_LIBS@

CURSES_LIBS		= @CURSES_LIBS@

ZLIB_CFLAGS		= @ZLIB_CFLAGS@
ZLIB_LIBS		= @ZLIB_LIBS@
ZLIB_LIBS_ALSO_STATIC	= @ZLIB_LIBS_ALSO_STATIC@

BZ2LIB_CFLAGS		= @BZ2LIB_CFLAGS@
BZ2LIB_LIBS		= @BZ2LIB_LIBS@
BZ2LIB_LIBS_ALSO_STATIC	= @BZ2LIB_LIBS_ALSO_STATIC@

ALL_CFLAGS		= $(CPPFLAGS) $(CFLAGS) $(DEFS) $(NLS_CFLAGS) $(INCLUDE_CFLAGS) $(ZLIB_CFLAGS) $(BZ2LIB_CFLAGS)
ALL_CXXFLAGS		= $(ALL_CFLAGS) $(CXXFLAGS)

ALSO_STATIC		= @ALSO_STATIC@
.c.o:
	$(CC) $(ALL_CFLAGS) -c $<

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

Makefile: $(srcdir)/Makefile.in
	(cd $(abs_builddir);CONFIG_FILES=$(subdir)$@ $(abs_builddir)/config.status)

foobar:
	@echo "srcdir='$(srcdir)'"
	@echo "subdir='$(subdir)'"
