1 # Makefile for GNU DIFF
2 # Copyright (C) 1988,1989,1991,1992,1993,1994,1997,1998 Free Software Foundation, Inc.
4 # This file is part of GNU DIFF.
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)
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.
16 #### Start of system configuration section. ####
19 top_srcdir = @top_srcdir@
32 exec_prefix = @exec_prefix@
36 #### End of system configuration section. ####
40 # The source files for all of the programs.
41 SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c context.c ed.c \
42 normal.c ifdef.c util.c dir.c version.c diff.h side.c system.h \
44 OBJECTS = diff.o diff3.o analyze.o cmpbuf.o dir.o io.o util.o \
45 context.o ed.o ifdef.o normal.o side.o version.o
46 DISTFILES = $(SOURCES) ChangeLog build_diff.com Makefile.in diagmeet.note \
47 libdiff.dsp .cvsignore
51 # $(top_srcdir)/lib is so we don't get the system-supplied headers for
52 # functions that we supply ourselves in lib. $(srcdir) is perhaps not
53 # necessary if we assume the unix compiler behavior whereby "" looks
54 # in the directory containing the .c file first.
55 # -I. is probably unnecessary (I don't think we generate any .h files).
56 # -I.. is for config.h.
57 COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) \
58 -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib $(CFLAGS)
63 libdiff libdiff.a: $(OBJECTS)
64 $(AR) cr libdiff.a $(OBJECTS)
67 $(OBJECTS): diff.h diffrun.h system.h
68 analyze.o cmpbuf.o: cmpbuf.h
71 $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $<
76 @: nothing to do for installdirs
88 rm -f TAGS tags Makefile
92 Makefile: Makefile.in ../config.status
93 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
97 for i in ${DISTFILES}; do \
98 ln $(srcdir)/$${i} ${DISTDIR}; \
101 # Prevent GNU make v3 from overflowing arg limit on SysV.