#
# "$Id: Makefile.in 388 2006-06-07 16:09:03Z fabien $"
#
# Makefile for fldiff, a graphical diff program.
#
# Copyright 2005 by Michael Sweet
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License v2 as published
# by the Free Software Foundation.
#
# 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.
#

# Installation directories
prefix		=	@prefix@
exec_prefix	=	@exec_prefix@
bindir		=	@bindir@
datadir		=	@datadir@
mandir		=	@mandir@
docdir		=	@docdir@
desktopdir	=	@desktopdir@

# Compiler definitions...
CP		=	@CP@
CXX		=	@CXX@
CXXFLAGS	=	@CPPFLAGS@ @CXXFLAGS@ -DVERSION=\"fldiff\ v@VERSION@\" @OPTIM@
FLTKCONFIG	=	@FLTKCONFIG@
LDFLAGS		=	@LDFLAGS@
LIBS		=	@LIBS@
MKDIR		=	@MKDIR@ -p
RM		=	@RM@ -f

# Rules for compiling...
.SUFFIXES:	.cxx .o
.cxx.o:
	$(CXX) $(CXXFLAGS) -c $<

# Objects...
OBJS		=	\
			DiffChooser.o \
			DiffOpenWindow.o \
			DiffView.o \
			DiffWindow.o \
			FavoritesMenu.o \
			FavoritesWindow.o \
			PtProcess.o \
			fldiff.o

# Standard install targets...
all:	fldiff

clean:
	$(RM) fldiff
	$(RM) $(OBJS)
	$(RM) *.bck
	$(RM) *~

depend:
	makedepend -Y -f .depend $(OBJS:.o=.cxx)

distclean:	clean
	$(RM) -r autom4te*
	$(RM) config.*
	$(RM) configure

install: @INSTALLDESKTOP@
	$(MKDIR) $(BUILDROOT)$(bindir)
	cp fldiff $(BUILDROOT)$(bindir)
	$(MKDIR) $(BUILDROOT)$(mandir)/man1
	cp fldiff.man $(BUILDROOT)$(mandir)/man1/fldiff.1
	$(MKDIR) $(BUILDROOT)$(docdir)
	cp index.html fldiff.jpg COPYING $(BUILDROOT)$(docdir)

install-desktop:
	$(MKDIR) $(BUILDROOT)$(desktopdir)/Development
	cp fldiff.desktop $(BUILDROOT)$(desktopdir)/Development
	$(MKDIR) $(BUILDROOT)$(datadir)/icons/hicolor/32x32/apps
	cp fldiff.png $(BUILDROOT)$(datadir)/icons/hicolor/32x32/apps

uninstall: @UNINSTALLDESKTOP@
	$(RM) $(BUILDROOT)$(bindir)/fldiff
	$(RM) $(BUILDROOT)$(mandir)/man1/fldiff.1
	rm -rf $(BUILDROOT)$(docdir)

uninstall-desktop:
	$(RM) $(desktopdir)/Development/fldiff.desktop
	$(RM) $(datadir)/icons/hicolor/32x32/apps/fldiff.png


# Build the fldiff program...
fldiff:		$(OBJS) Makefile
	$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
	$(FLTKCONFIG) --post $@

$(OBJS):	Makefile


# autoconf stuff...
Makefile: configure Makefile.in
	if test -f config.status; then \
		./config.status --recheck; \
		./config.status; \
	else \
		./configure; \
	fi

configure: configure.in
	autoconf

# Include dependencies...
include .depend


#
# End of "$Id: Makefile.in 388 2006-06-07 16:09:03Z fabien $".
#
