summaryrefslogtreecommitdiff
path: root/src/Makefile.in
blob: e69bad2eee54447bae15400f80314846f1152ef0 (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Makefile for gperf/src

# Copyright (C) 1989, 1992, 1993, 1998, 2000, 2002, 2006, 2009, 2012 Free Software Foundation, Inc.
# Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
# and Bruno Haible <bruno@clisp.org>.
#
# This file is part of GNU GPERF.
#
# This program 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 3 of the License, or
# (at your option) any later version.
#
# This program 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.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

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

# Directories used by "make":
srcdir = @srcdir@

# Directories used by "make install":
prefix = @prefix@
local_prefix = /usr/local
exec_prefix = @exec_prefix@
bindir = @bindir@

# Programs used by "make":
# C compiler
CC = @CC@
CFLAGS = @CFLAGS@
CPP = @CPP@
# C++ compiler
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
CXXCPP = @CXXCPP@
# Both C and C++ compiler
LDFLAGS = @LDFLAGS@
OBJEXT = @OBJEXT@
EXEEXT = @EXEEXT@
# Other
MV = mv
LN = ln
RM = rm -f
@SET_MAKE@

# Programs used by "make install":
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(SHELL) $(srcdir)/../build-aux/mkinstalldirs

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

SHELL = /bin/sh

VPATH = $(srcdir)

OBJECTS  = version.$(OBJEXT) positions.$(OBJEXT) options.$(OBJEXT) keyword.$(OBJEXT) keyword-list.$(OBJEXT) \
           input.$(OBJEXT) bool-array.$(OBJEXT) hash-table.$(OBJEXT) search.$(OBJEXT) output.$(OBJEXT) main.$(OBJEXT)
LIBS     = ../lib/libgp.a @GPERF_LIBM@
CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir)/../lib

TARGETPROG = gperf$(EXEEXT)

all : $(TARGETPROG)

$(TARGETPROG): $(OBJECTS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)

# Don't use implicit rules, since AIX "make" and OSF/1 "make" don't always
# expand $< correctly in this context.
#
#%.o : %.c
#	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
#
#%.o : %.cc
#	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<

# Dependencies.
CONFIG_H = config.h
VERSION_H = version.h
POSITIONS_H = positions.h positions.icc
OPTIONS_H = options.h options.icc $(POSITIONS_H)
KEYWORD_H = keyword.h keyword.icc
KEYWORD_LIST_H = keyword-list.h keyword-list.icc $(KEYWORD_H)
INPUT_H = input.h $(KEYWORD_LIST_H)
BOOL_ARRAY_H = bool-array.h bool-array.icc $(OPTIONS_H)
HASH_TABLE_H = hash-table.h $(KEYWORD_H)
SEARCH_H = search.h $(KEYWORD_LIST_H) $(POSITIONS_H) $(BOOL_ARRAY_H)
OUTPUT_H = output.h $(KEYWORD_LIST_H) $(POSITIONS_H)

version.$(OBJEXT): version.cc $(VERSION_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/version.cc
positions.$(OBJEXT): positions.cc $(POSITIONS_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/positions.cc
options.$(OBJEXT): options.cc $(OPTIONS_H) $(VERSION_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/options.cc
keyword.$(OBJEXT): keyword.cc $(KEYWORD_H) $(POSITIONS_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/keyword.cc
keyword-list.$(OBJEXT): keyword-list.cc $(KEYWORD_LIST_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/keyword-list.cc
input.$(OBJEXT): input.cc $(INPUT_H) $(OPTIONS_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/input.cc
bool-array.$(OBJEXT): bool-array.cc $(BOOL_ARRAY_H) $(OPTIONS_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/bool-array.cc
hash-table.$(OBJEXT): hash-table.cc $(HASH_TABLE_H) $(OPTIONS_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/hash-table.cc
search.$(OBJEXT): search.cc $(SEARCH_H) $(OPTIONS_H) $(HASH_TABLE_H) $(CONFIG_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/search.cc
output.$(OBJEXT): output.cc $(OUTPUT_H) $(OPTIONS_H) $(VERSION_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/output.cc
main.$(OBJEXT): main.cc $(OPTIONS_H) $(INPUT_H) $(SEARCH_H) $(OUTPUT_H)
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(srcdir)/main.cc

install : all force
	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
	$(INSTALL_PROGRAM) $(TARGETPROG) $(DESTDIR)$(bindir)/$(TARGETPROG)

installdirs : force
	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)

uninstall : force
	$(RM) $(DESTDIR)$(bindir)/$(TARGETPROG)

check : all

mostlyclean : clean

clean : force
	$(RM) *~ *.s *.$(OBJEXT) *.a $(TARGETPROG) core

distclean : clean
	$(RM) config.status config.log config.cache Makefile config.h

maintainer-clean : distclean

# List of source files.
SOURCE_FILES = \
  configure.ac Makefile.in \
  version.cc $(VERSION_H) \
  positions.cc $(POSITIONS_H) \
  options.cc $(OPTIONS_H) \
  keyword.cc $(KEYWORD_H) \
  keyword-list.cc $(KEYWORD_LIST_H) \
  input.cc $(INPUT_H) \
  bool-array.cc $(BOOL_ARRAY_H) \
  hash-table.cc $(HASH_TABLE_H) \
  search.cc $(SEARCH_H) \
  output.cc $(OUTPUT_H) \
  main.cc
# List of distributed files imported from other packages.
IMPORTED_FILES =
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES = \
  configure config.h.in config.h_vms
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)

distdir : $(DISTFILES)
	for file in $(DISTFILES); do \
	  if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
	  cp -p $$dir/$$file '$(distdir)'/$$file || exit 1; \
	done

force :