# Bluefish HTML Editor
# Copyright (C) 1998-1999 Olivier Sessink and Chris Mazuc
# Copyright (C) 2000-2001 Olivier Sessink
#
# 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
# (at your option) 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

SHELL = /bin/sh
VPATH = @srcdir@

PACKAGE = @PACKAGE@
VERSION = @VERSION@

top_srcdir = @top_srcdir@
top_builddir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
pkgdatadir = @pkgdatadir@

infodir = $(prefix)/info
libdir = $(prefix)/lib/gnudl
mandir = $(prefix)/man/man1
localedir = @localedir@
gnulocaledir = $(prefix)/share/locale
aliaspath = $(localedir):.

CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @INTLLIBS@ @LIBS@
INSTALL = @INSTALL@
INSTALL_DIR = $(INSTALL) -d -m 755 
INSTALL_PROGRAM = $(INSTALL) -s -m 755
DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" -DPKGDATADIR=\"$(pkgdatadir)\" @DEFS@

SRCS = html_diag.c bf_lib.c document.c project.c pixmaps.c \
gtk_easy.c rpopup.c html2.c stringlist.c undo2.c configure.c \
ref_dialog.c init.c snr2.c callbacks.c interface.c toolbars.c \
html.c wizards.c images.c coloursel.c network.c bluefish.c cap.c \
menu.c highlight.c filter.c wml.c html_table.c html_form.c spell.c \
spell_gui.c javascript.c char_table.c gdk_pixbuf_save.c perl.c \
complet.c parsedtd.c attrpage.c perl_ezembed.c
OBJS = $(SRCS:.c=.o)

all: bluefish
bluefish: .depends $(SRCS) $(OBJS)
	$(CC) $(DEFS) -o bluefish $(OBJS) $(LDFLAGS) $(LIBS)

.c.o: $(SRCS)
	$(CC) $(DEFS) $(CFLAGS) -c -o $@ $<

clean:
	rm -f $(OBJS) bluefish core *~ *.bak .depends

.depends: $(SRCS) Makefile
	$(CC) -M $(CFLAGS) $(SRCS) > .depends
#include .depends

patchclean: clean
	rm -f *.orig *.rej  

distclean: patchclean
	rm -f config.h

install: all
	$(INSTALL_DIR) $(DESTDIR)$(bindir)
	$(INSTALL_PROGRAM) ./bluefish $(DESTDIR)$(bindir)/bluefish

uninstall:
	/bin/rm -f $(bindir)/bluefish









