1# Makefile for GNU DIFF 2# Copyright (C) 1988,1989,1991,1992,1993,1994,1997,1998 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#### Start of system configuration section. #### 17 18srcdir = @srcdir@ 19top_srcdir = @top_srcdir@ 20VPATH = @srcdir@ 21subdir = diff 22 23CC = @CC@ 24AR = ar 25 26CPPFLAGS = @CPPFLAGS@ 27DEFS = @DEFS@ 28RANLIB = @RANLIB@ 29CFLAGS = @CFLAGS@ 30 31prefix = @prefix@ 32exec_prefix = @exec_prefix@ 33 34PR_PROGRAM = /usr/bin/pr 35 36#### End of system configuration section. #### 37 38SHELL = /bin/sh 39 40# The source files for all of the programs. 41SOURCES = 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 \ 43 diffrun.h 44OBJECTS = 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 46DISTFILES = $(SOURCES) ChangeLog build_diff.com Makefile.in diagmeet.note 47 48all: libdiff.a 49 50# $(top_srcdir)/lib is so we don't get the system-supplied headers for 51# functions that we supply ourselves in lib. $(srcdir) is perhaps not 52# necessary if we assume the unix compiler behavior whereby "" looks 53# in the directory containing the .c file first. 54# -I. is probably unnecessary (I don't think we generate any .h files). 55# -I.. is for config.h. 56COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) \ 57 -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib $(CFLAGS) 58 59.c.o: 60 $(COMPILE) $< 61 62libdiff libdiff.a: $(OBJECTS) 63 $(AR) cr libdiff.a $(OBJECTS) 64 -$(RANLIB) libdiff.a 65 66$(OBJECTS): diff.h diffrun.h system.h 67analyze.o cmpbuf.o: cmpbuf.h 68 69util.o: util.c 70 $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $< 71 72install: all 73 74installdirs: 75 @: nothing to do for installdirs 76.PHONY: installdirs 77 78TAGS: $(SOURCES) 79 etags $(SOURCES) 80 81clean: 82 rm -f *.o *.a core 83 84mostlyclean: clean 85 86distclean: clean 87 rm -f TAGS tags Makefile 88 89realclean: distclean 90 91Makefile: Makefile.in ../config.status 92 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status 93 94dist-dir: 95 mkdir ${DISTDIR} 96 for i in ${DISTFILES}; do \ 97 ln $(srcdir)/$${i} ${DISTDIR}; \ 98 done 99 100# Prevent GNU make v3 from overflowing arg limit on SysV. 101.NOEXPORT: 102