1#
2# "$Id: Makefile.in 388 2006-06-07 16:09:03Z fabien $"
3#
4# Makefile for fldiff, a graphical diff program.
5#
6# Copyright 2005 by Michael Sweet
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License v2 as published
10# by the Free Software Foundation.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU General Public License for more details.
16#
17
18# Installation directories
19prefix		=	@prefix@
20exec_prefix	=	@exec_prefix@
21bindir		=	@bindir@
22datadir		=	@datadir@
23mandir		=	@mandir@
24docdir		=	@docdir@
25desktopdir	=	@desktopdir@
26
27# Compiler definitions...
28CP		=	@CP@
29CXX		=	@CXX@
30CXXFLAGS	=	@CPPFLAGS@ @CXXFLAGS@ -DVERSION=\"fldiff\ v@VERSION@\"
31FLTKCONFIG	=	@FLTKCONFIG@
32LDFLAGS		=	@LDFLAGS@
33LIBS		=	@LIBS@
34MKDIR		=	@MKDIR@ -p
35RM		=	@RM@ -f
36
37# Rules for compiling...
38.SUFFIXES:	.cxx .o
39.cxx.o:
40	$(CXX) $(CXXFLAGS) -c $<
41
42# Objects...
43OBJS		=	\
44			DiffChooser.o \
45			DiffOpenWindow.o \
46			DiffView.o \
47			DiffWindow.o \
48			FavoritesMenu.o \
49			FavoritesWindow.o \
50			PtProcess.o \
51			fldiff.o
52
53# Standard install targets...
54all:	fldiff
55
56clean:
57	$(RM) fldiff
58	$(RM) $(OBJS)
59	$(RM) *.bck
60	$(RM) *~
61
62depend:
63	makedepend -Y -f .depend $(OBJS:.o=.cxx)
64
65distclean:	clean
66	$(RM) -r autom4te*
67	$(RM) config.*
68	$(RM) configure
69
70install: @INSTALLDESKTOP@
71	$(MKDIR) $(BUILDROOT)$(bindir)
72	cp fldiff $(BUILDROOT)$(bindir)
73	$(MKDIR) $(BUILDROOT)$(mandir)/man1
74	cp fldiff.man $(BUILDROOT)$(mandir)/man1/fldiff.1
75	$(MKDIR) $(BUILDROOT)$(docdir)
76	cp index.html fldiff.jpg COPYING $(BUILDROOT)$(docdir)
77
78install-desktop:
79	$(MKDIR) $(BUILDROOT)$(desktopdir)/Development
80	cp fldiff.desktop $(BUILDROOT)$(desktopdir)/Development
81	$(MKDIR) $(BUILDROOT)$(datadir)/icons/hicolor/32x32/apps
82	cp fldiff.png $(BUILDROOT)$(datadir)/icons/hicolor/32x32/apps
83
84uninstall: @UNINSTALLDESKTOP@
85	$(RM) $(BUILDROOT)$(bindir)/fldiff
86	$(RM) $(BUILDROOT)$(mandir)/man1/fldiff.1
87	rm -rf $(BUILDROOT)$(docdir)
88
89uninstall-desktop:
90	$(RM) $(desktopdir)/Development/fldiff.desktop
91	$(RM) $(datadir)/icons/hicolor/32x32/apps/fldiff.png
92
93
94# Build the fldiff program...
95fldiff:		$(OBJS) Makefile
96	$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
97	$(FLTKCONFIG) --post $@
98
99$(OBJS):	Makefile
100
101
102# autoconf stuff...
103Makefile: configure Makefile.in
104	if test -f config.status; then \
105		./config.status --recheck; \
106		./config.status; \
107	else \
108		./configure; \
109	fi
110
111configure: configure.in
112	autoconf
113
114# Include dependencies...
115include .depend
116
117
118#
119# End of "$Id: Makefile.in 388 2006-06-07 16:09:03Z fabien $".
120#
121