# Makedefs.in -- input for the common Makefile definitions
# $Id: Makedefs.in,v 1.29 2005/07/01 16:04:49 jsh Exp $
#
# Copyright (C) 1999 John Harper <john@dcs.warwick.ac.uk>
#
# This file is part of sawfish.
#
# sawfish 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, or (at your option)
# any later version.
#
# sawfish 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 sawfish; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

repexecdir=@REP_EXECDIR@
include $(repexecdir)/rules.mk

version=@version@
codename=@codename@
subversion=@subversion@
rep_version=@REP_VERSION@
SHELL=/bin/sh

prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
datadir=@datadir@
bindir=@bindir@
includedir=@includedir@
infodir=@infodir@
libdir=@libdir@
localstatedir=@localstatedir@
mandir=@mandir@
sharedstatedir=@sharedstatedir@

sawfishdir=@sawfishdir@
sawfishimagedir=@sawfishdir@/images
lispdir=@lispdir@
localedir=@localedir@
sawfishexecdir=@sawfishexecdir@
GNOMEDIR=@GNOMEDIR@
KDE4DIR=@KDE4DIR@
KDE5DIR=@KDE5DIR@

KDE4_SESSION=@KDE4_SESSION@
KDE5_SESSION=@KDE5_SESSION@
GNOME2_SESSION=@GNOME2_SESSION@
MATE_SESSION=@MATE_SESSION@
XFCE_SESSION=@XFCE_SESSION@
LUMINA_SESSION=@LUMINA_SESSION@

CC=@CC@
MAKEDEP=@MAKEDEP@
CPPFLAGS=-DHAVE_CONFIG_H -DSAWFISH -D__STRICT_ANSI__ -I. -I.. @CPPFLAGS@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
#LIBOBJS=@LIBOBJS@
LIBOBJS=
X11_CFLAGS=@X_CFLAGS@ @XFT_CFLAGS@
X11_LIBS=-lX11 @X_LIBS@ @X_EXTRA_LIBS@
EXTRA_X11_LIBS=@XINERAMA_LIBS@ @XRANDR_LIBS@ @XFT_LIBS@ -lXext
IMAGE_LIBS=@IMAGE_LIBS@
IMAGE_CFLAGS=@IMAGE_CFLAGS@
GTK_CFLAGS=@GTK_CFLAGS@
GTK_LIBS=@GTK_LIBS@
REP_CFLAGS=@REP_CFLAGS@
REP_LIBS=@REP_LIBS@
LINGUAS=@LINGUAS@
PANGO_CFLAGS=@PANGO_CFLAGS@
PANGO_LIBS=@PANGO_LIBS@

DESTDIR=
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_SCRIPT=@INSTALL_SCRIPT@

.PHONY: clean realclean install

%.o : %.c
	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<

% : %.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)

# This rule builds dependency files from C source files.
.%.d : %.c
	$(SHELL) -ec '$(MAKEDEP) $(CPPFLAGS) $(CFLAGS) $< \
	| sed '\''s/$*\.o/& $*.lo .$*\.d/g'\'' > $@'

# Always use GNU gettext implementation
REP_MSGFMT=@REP_MSGFMT@

# used when compiling/running lisp code
REP_ENVIRON=REP_DL_LOAD_PATH=$(top_builddir)/src/.libexec \
	    REP_GTK_DONT_INITIALIZE=1

%.mo : %.po
	$(REP_MSGFMT) $(MSGFMTFLAGS) -o $@ $<
