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 libdiff.dsp .cvsignore 48 49all: libdiff.a 50 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. 57COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) \ 58 -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib $(CFLAGS) 59 60.c.o: 61 $(COMPILE) $< 62 63libdiff libdiff.a: $(OBJECTS) 64 $(AR) cr libdiff.a $(OBJECTS) 65 -$(RANLIB) libdiff.a 66 67$(OBJECTS): diff.h diffrun.h system.h 68analyze.o cmpbuf.o: cmpbuf.h 69 70util.o: util.c 71 $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $< 72 73install: all 74 75installdirs: 76 @: nothing to do for installdirs 77.PHONY: installdirs 78 79TAGS: $(SOURCES) 80 etags $(SOURCES) 81 82clean: 83 rm -f *.o *.a core 84 85mostlyclean: clean 86 87distclean: clean 88 rm -f TAGS tags Makefile 89 90realclean: distclean 91 92Makefile: Makefile.in ../config.status 93 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status 94 95dist-dir: 96 mkdir ${DISTDIR} 97 for i in ${DISTFILES}; do \ 98 ln $(srcdir)/$${i} ${DISTDIR}; \ 99 done 100 101# Prevent GNU make v3 from overflowing arg limit on SysV. 102.NOEXPORT: 103