1# Makefile for GNU Texindex.
2# Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
3
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2, or (at your option)
7# any later version.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18#### Start of system configuration section. ####
19
20srcdir = @srcdir@
21VPATH  = $(srcdir)
22
23CC = @CC@
24INSTALL = @INSTALL@
25INSTALL_PROGRAM = @INSTALL_PROGRAM@
26INSTALL_DATA = @INSTALL_DATA@
27
28LN	= ln
29RM	= rm -f
30TAR	= tar
31MKDIR	= mkdir
32RANLIB = @RANLIB@
33DEFS = -DEUC @DEFS@
34LIBS = -L./ -ltxi @LIBS@
35LOADLIBES = $(LIBS)
36
37# This is normally inherited from parent make, but if someone wants to
38# build libtxi.a alone, this variable will still be properly defined.
39ALLOCA = @ALLOCA@
40
41SHELL = /bin/sh
42
43CFLAGS = @CFLAGS@
44LDFLAGS = @LDFLAGS@
45
46prefix = @prefix@
47exec_prefix = @exec_prefix@
48bindir = $(exec_prefix)/bin
49# Prefix for each installed program, normally empty or `g'.
50
51#### End of system configuration section. ####
52
53SRCS =  getopt.c getopt.h getopt1.c bzero.c
54OBJS =  getopt.o getopt1.o bzero.o $(ALLOCA)
55
56PROGS = libtxi.a
57
58all: texindex $(PROGS)
59sub-all: all
60
61.c.o:
62	$(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
63
64
65install: all
66	$(INSTALL_PROGRAM) texindex $(bindir)/texindex
67
68uninstall:
69	rm -f $(bindir)/texindex
70
71TAGS:
72	etags *.c *.h getopt*.c getopt.h
73
74clean:
75	rm -f *.o a.out core core.* texindex $(PROGS)
76
77mostlyclean: clean
78
79distclean: clean
80	rm -f Makefile config.status
81
82realclean: distclean
83	rm -f TAGS
84
85texindex: texindex.o libtxi.a
86	$(CC) $(LDFLAGS) -o texindex texindex.o $(LOADLIBES)
87
88libtxi.a: $(OBJS)
89	ar qcv libtxi.a $(OBJS)
90	$(RANLIB) libtxi.a
91
92texindex.o: texindex.c getopt.h
93getopt.o: getopt.c getopt.h
94getopt1.o: getopt1.c getopt.h
95alloca.o: alloca.c
96
97# Prevent GNU make v3 from overflowing arg limit on SysV.
98.NOEXPORT:
99