1# Makefile for gperf/lib
2
3# Copyright (C) 1989, 1992, 1993, 1998, 2002 Free Software Foundation, Inc.
4# Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
5# and Bruno Haible <bruno@clisp.org>.
6#
7# This file is part of GNU GPERF.
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
22#### Start of system configuration section. ####
23
24# Directories used by "make":
25srcdir = @srcdir@
26
27# Directories used by "make install":
28prefix = @prefix@
29local_prefix = /usr/local
30exec_prefix = @exec_prefix@
31
32# Programs used by "make":
33# C compiler
34CC = @CC@
35CFLAGS = @CFLAGS@
36CPP = @CPP@
37# C++ compiler
38CXX = @CXX@
39CXXFLAGS = @CXXFLAGS@
40CXXCPP = @CXXCPP@
41# Both C and C++ compiler
42OBJEXT = @OBJEXT@
43# Other
44AR = ar
45AR_FLAGS = rc
46RANLIB = @RANLIB@
47MV = mv
48LN = ln
49RM = rm -f
50@SET_MAKE@
51
52# Programs used by "make install":
53INSTALL = @INSTALL@
54INSTALL_PROGRAM = @INSTALL_PROGRAM@
55INSTALL_DATA = @INSTALL_DATA@
56
57#### End of system configuration section. ####
58
59SHELL = /bin/sh
60
61VPATH = $(srcdir)
62
63OBJECTS  = getopt.$(OBJEXT) getopt1.$(OBJEXT) getline.$(OBJEXT) hash.$(OBJEXT)
64CPPFLAGS = -I$(srcdir)
65
66TARGETLIB = libgp.a
67
68all : $(TARGETLIB)
69
70$(TARGETLIB): $(OBJECTS)
71	$(RM) $@
72	$(AR) $(AR_FLAGS) $@ $(OBJECTS)
73	$(RANLIB) $@
74
75# Don't use implicit rules, since AIX "make" and OSF/1 "make" don't always
76# expand $< correctly in this context.
77#
78#%.o : %.c
79#	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
80#
81#%.o : %.cc
82#	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
83
84getopt.o : getopt.c getopt.h
85	$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/getopt.c
86
87getopt1.o : getopt1.c getopt.h
88	$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/getopt1.c
89
90getline.o : getline.cc getline.h
91	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/getline.cc
92
93hash.o : hash.cc hash.h
94	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/hash.cc
95
96install : all
97
98installdirs :
99
100uninstall :
101
102check : all
103
104mostlyclean : clean
105
106clean : force
107	$(RM) *~ *.s *.o *.a $(TARGETLIB) core
108
109distclean : clean
110	$(RM) config.status config.log config.cache Makefile
111
112maintainer-clean : distclean
113
114force :
115