summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/diff/Makefile.in
blob: 31f491020666ccfefa7c96fae03d0e9d046a791f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Makefile for GNU DIFF
# Copyright (C) 1988,1989,1991,1992,1993,1994,1997,1998 Free Software Foundation, Inc.
#
# This file is part of GNU DIFF.
#
# GNU DIFF is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU DIFF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

#### Start of system configuration section. ####

srcdir     = @srcdir@
top_srcdir = @top_srcdir@
VPATH      = @srcdir@
subdir     = diff

CC = @CC@
AR = ar

CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@

prefix = @prefix@
exec_prefix = @exec_prefix@

PR_PROGRAM = /bin/pr

#### End of system configuration section. ####

SHELL = /bin/sh

# The source files for all of the programs.
SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c context.c ed.c \
	normal.c ifdef.c util.c dir.c version.c diff.h side.c system.h \
	diffrun.h
OBJECTS = diff.o diff3.o analyze.o cmpbuf.o dir.o io.o util.o \
	context.o ed.o ifdef.o normal.o side.o version.o
DISTFILES = $(SOURCES) ChangeLog build_diff.com Makefile.in diagmeet.note \
	libdiff.dsp .cvsignore

all: libdiff.a

# $(top_srcdir)/lib is so we don't get the system-supplied headers for
# functions that we supply ourselves in lib.  $(srcdir) is perhaps not
# necessary if we assume the unix compiler behavior whereby "" looks
# in the directory containing the .c file first.
# -I. is probably unnecessary (I don't think we generate any .h files).
# -I.. is for config.h.
COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) \
	-I. -I.. -I$(srcdir) -I$(top_srcdir)/lib $(CFLAGS)

.c.o:
	$(COMPILE) $<

libdiff libdiff.a: $(OBJECTS)
	$(AR) cr libdiff.a $(OBJECTS)
	-$(RANLIB) libdiff.a

$(OBJECTS): diff.h diffrun.h system.h
analyze.o cmpbuf.o: cmpbuf.h

util.o: util.c
	$(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $<

install: all

installdirs:
	@: nothing to do for installdirs
.PHONY: installdirs

TAGS: $(SOURCES)
	etags $(SOURCES)

clean:
	rm -f *.o *.a core

mostlyclean: clean

distclean: clean
	rm -f TAGS tags Makefile

realclean: distclean

Makefile: Makefile.in ../config.status
	cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status 

dist-dir:
	mkdir ${DISTDIR}
	for i in ${DISTFILES}; do \
	  ln $(srcdir)/$${i} ${DISTDIR}; \
	done

# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT:
OpenPOWER on IntegriCloud