Makefile.in revision 32785
1# Makefile for GNU DIFF
2# Copyright (C) 1988,1989,1991,1992,1993,1994,1997 Free Software Foundation, Inc.
3#
4# This file is part of GNU DIFF.
5#
6# GNU DIFF is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
10#
11# GNU DIFF is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with GNU DIFF; see the file COPYING.  If not, write to
18# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20#### Start of system configuration section. ####
21
22srcdir     = @srcdir@
23top_srcdir = @top_srcdir@
24VPATH      = @srcdir@
25subdir     = diff
26
27CC = @CC@
28AR = ar
29
30CPPFLAGS = @CPPFLAGS@
31DEFS = @DEFS@
32RANLIB = @RANLIB@
33CFLAGS = @CFLAGS@
34
35prefix = @prefix@
36exec_prefix = @exec_prefix@
37
38PR_PROGRAM = /bin/pr
39
40#### End of system configuration section. ####
41
42SHELL = /bin/sh
43
44# The source files for all of the programs.
45SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c context.c ed.c \
46	normal.c ifdef.c util.c dir.c version.c diff.h side.c system.h
47OBJECTS = diff.o diff3.o analyze.o cmpbuf.o dir.o io.o util.o \
48	context.o ed.o ifdef.o normal.o side.o version.o
49DISTFILES = $(SOURCES) ChangeLog build_diff.com Makefile.in
50
51all: libdiff.a
52
53# $(top_srcdir)/lib is so we don't get the system-supplied headers for
54# functions that we supply ourselves in lib.  $(srcdir) is perhaps not
55# necessary if we assume the unix compiler behavior whereby "" looks
56# in the directory containing the .c file first.
57# -I. is probably unnecessary (I don't think we generate any .h files).
58# -I.. is for config.h.
59COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) \
60	-I. -I.. -I$(srcdir) -I$(top_srcdir)/lib $(CFLAGS)
61
62.c.o:
63	$(COMPILE) $<
64
65libdiff libdiff.a: $(OBJECTS)
66	$(AR) cr libdiff.a $(OBJECTS)
67	-$(RANLIB) libdiff.a
68
69$(OBJECTS): diff.h system.h
70analyze.o cmpbuf.o: cmpbuf.h
71
72util.o: util.c
73	$(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $<
74
75install: all
76
77installdirs:
78	@: nothing to do for installdirs
79.PHONY: installdirs
80
81TAGS: $(SOURCES)
82	etags $(SOURCES)
83
84clean:
85	rm -f *.o *.a core
86
87mostlyclean: clean
88
89distclean: clean
90	rm -f TAGS tags Makefile
91
92realclean: distclean
93
94Makefile: Makefile.in ../config.status
95	cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status 
96
97dist-dir:
98	mkdir ${DISTDIR}
99	for i in ${DISTFILES}; do \
100	  ln $(srcdir)/$${i} ${DISTDIR}; \
101	done
102
103# Prevent GNU make v3 from overflowing arg limit on SysV.
104.NOEXPORT:
105