1# Makefile for gperf/src 2 3# Copyright (C) 1989, 1992, 1993, 1998, 2000, 2002, 2006 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# GNU GPERF 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 2, or (at your option) 12# any later version. 13# 14# GNU GPERF 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; see the file COPYING. 21# If not, write to the Free Software Foundation, Inc., 22# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 23 24#### Start of system configuration section. #### 25 26# Directories used by "make": 27srcdir = @srcdir@ 28 29# Directories used by "make install": 30prefix = @prefix@ 31local_prefix = /usr/local 32exec_prefix = @exec_prefix@ 33bindir = @bindir@ 34 35# Programs used by "make": 36# C compiler 37CC = @CC@ 38CFLAGS = @CFLAGS@ 39CPP = @CPP@ 40# C++ compiler 41CXX = @CXX@ 42CXXFLAGS = @CXXFLAGS@ 43CXXCPP = @CXXCPP@ 44# Both C and C++ compiler 45LDFLAGS = @LDFLAGS@ 46OBJEXT = @OBJEXT@ 47EXEEXT = @EXEEXT@ 48# Other 49MV = mv 50LN = ln 51RM = rm -f 52@SET_MAKE@ 53 54# Programs used by "make install": 55INSTALL = @INSTALL@ 56INSTALL_PROGRAM = @INSTALL_PROGRAM@ 57INSTALL_DATA = @INSTALL_DATA@ 58MKINSTALLDIRS = $(SHELL) $(srcdir)/../mkinstalldirs 59 60#### End of system configuration section. #### 61 62SHELL = /bin/sh 63 64VPATH = $(srcdir) 65 66OBJECTS = version.$(OBJEXT) positions.$(OBJEXT) options.$(OBJEXT) keyword.$(OBJEXT) keyword-list.$(OBJEXT) \ 67 input.$(OBJEXT) bool-array.$(OBJEXT) hash-table.$(OBJEXT) search.$(OBJEXT) output.$(OBJEXT) main.$(OBJEXT) 68LIBS = ../lib/libgp.a @GPERF_LIBM@ 69CPPFLAGS = -I. -I$(srcdir)/../lib 70 71TARGETPROG = gperf$(EXEEXT) 72 73all : $(TARGETPROG) 74 75$(TARGETPROG): $(OBJECTS) 76 $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) 77 78# Don't use implicit rules, since AIX "make" and OSF/1 "make" don't always 79# expand $< correctly in this context. 80# 81#%.o : %.c 82# $(CC) $(CFLAGS) $(CPPFLAGS) -c $< 83# 84#%.o : %.cc 85# $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< 86 87# Dependencies. 88CONFIG_H = config.h 89VERSION_H = version.h 90POSITIONS_H = positions.h positions.icc 91OPTIONS_H = options.h options.icc $(POSITIONS_H) 92KEYWORD_H = keyword.h keyword.icc 93KEYWORD_LIST_H = keyword-list.h keyword-list.icc $(KEYWORD_H) 94INPUT_H = input.h $(KEYWORD_LIST_H) 95BOOL_ARRAY_H = bool-array.h bool-array.icc $(OPTIONS_H) 96HASH_TABLE_H = hash-table.h $(KEYWORD_H) 97SEARCH_H = search.h $(KEYWORD_LIST_H) $(POSITIONS_H) $(BOOL_ARRAY_H) 98OUTPUT_H = output.h $(KEYWORD_LIST_H) $(POSITIONS_H) 99 100version.$(OBJEXT): version.cc $(VERSION_H) 101 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/version.cc 102positions.$(OBJEXT): positions.cc $(POSITIONS_H) 103 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/positions.cc 104options.$(OBJEXT): options.cc $(OPTIONS_H) $(VERSION_H) 105 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/options.cc 106keyword.$(OBJEXT): keyword.cc $(KEYWORD_H) $(POSITIONS_H) 107 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/keyword.cc 108keyword-list.$(OBJEXT): keyword-list.cc $(KEYWORD_LIST_H) 109 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/keyword-list.cc 110input.$(OBJEXT): input.cc $(INPUT_H) $(OPTIONS_H) 111 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/input.cc 112bool-array.$(OBJEXT): bool-array.cc $(BOOL_ARRAY_H) $(OPTIONS_H) 113 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/bool-array.cc 114hash-table.$(OBJEXT): hash-table.cc $(HASH_TABLE_H) $(OPTIONS_H) 115 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/hash-table.cc 116search.$(OBJEXT): search.cc $(SEARCH_H) $(OPTIONS_H) $(HASH_TABLE_H) $(CONFIG_H) 117 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/search.cc 118output.$(OBJEXT): output.cc $(OUTPUT_H) $(OPTIONS_H) $(VERSION_H) 119 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/output.cc 120main.$(OBJEXT): main.cc $(OPTIONS_H) $(INPUT_H) $(SEARCH_H) $(OUTPUT_H) 121 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/main.cc 122 123install : all force 124 $(MKINSTALLDIRS) $(DESTDIR)$(bindir) 125 $(INSTALL_PROGRAM) $(TARGETPROG) $(DESTDIR)$(bindir)/$(TARGETPROG) 126 127installdirs : force 128 $(MKINSTALLDIRS) $(DESTDIR)$(bindir) 129 130uninstall : force 131 $(RM) $(DESTDIR)$(bindir)/$(TARGETPROG) 132 133check : all 134 135mostlyclean : clean 136 137clean : force 138 $(RM) *~ *.s *.$(OBJEXT) *.a $(TARGETPROG) core 139 140distclean : clean 141 $(RM) config.status config.log config.cache Makefile config.h 142 143maintainer-clean : distclean 144 145force : 146