forked from libdfp/libdfp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
487 lines (392 loc) · 18.5 KB
/
Makefile.in
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
ifneq (,)
This Makefile requires GNU Make.
endif
top_srcdir := @top_srcdir@
top_builddir = .
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
docdir = @docdir@
datarootdir = @datarootdir@
# Where to install the library and object files.
ifndef libdir
libdir = $(exec_prefix)/lib
endif
inst_libdir = $(DESTDIR)$(libdir)
# Where to install the header files.
ifndef includedir
includedir = $(prefix)/include
endif
inst_includedir = $(DESTDIR)$(includedir)
# Where to install the README document
ifndef docdir
docdir = $(prefix)/share/doc/
endif
inst_docdir = $(DESTDIR)$(docdir)
dfp_name = @PACKAGE_NAME@
dfp_version = @PACKAGE_VERSION@
STATIC_LIB = @[email protected]
# The real library code: e.g. libdfp-1.0.0.so.
SHARED_REALNAME_LIB = @PACKAGE_NAME@-@[email protected]
# The soname that symlinks to the real library code: e.g. libdfp.so.1.
# Traditionally the version number on the soname defined the 'interface'
# version. Since this library intends to use symbol versioning there
# probably isn't ever a reason to move to .so.2 or later but we'll follow the
# precedent.
SHARED_SONAME_LIB = @[email protected]
# The linkername that symlinks to the soname: e.g. libdfp.so. The linker looks for this name.
SHARED_LINKERNAME_LIB = @[email protected]
CC = @CC@
CXX = @CXX@
LDD = @LDD@
OBJDUMP = @OBJDUMP@
READELF = @READELF@
GDB = @GDB@
CXXFLAGS = @CXXFLAGS@ # This may be naive
CPPFLAGS = @CPPFLAGS@
RANLIB = @RANLIB@
AWK = @AWK@
LDFLAGS = @LDFLAGS@
INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
# e.g. powerpc
base_machine = @base_machine@
# e.g. powerpc32
machine = @machine@
# e.g. -mcpu=power6
libdfp_cv_submachine_opt = @libdfp_cv_submachine_opt@
ifdef libdfp_cv_submachine_opt
cflags-cpu = $(libdfp_cv_submachine_opt)
asflags-cpu = $(libdfp_cv_submachine_opt)
endif
picflag = @picflag@
cxxdecimal = @cxxdecimal@
default_cflags := @CFLAGS@
default_asflags := @ASFLAGS@
ifndef +cflags
# Remove -I stuff from CFLAGS.
+cflags := $(filter-out -I%,$(default_cflags))
endif
# Add -mcpu=<CPU> targets and -f[pic|PIC].
+cflags += $(cflags-cpu) $(picflag)
# Don't duplicate options.
+cflags := $(sort $(+cflags))
override CFLAGS = $(gnu-inline-CFLAGS) $(+cflags)
# These are the flags given to the compiler to tell it what sort of
# optimization and/or debugging output to do for .S files.
ifndef +asflags
# Remove -I stuff from ASFLAGS.
+asflags := $(filter-out -I%,$(default_asflags))
endif
# This makes sure -mcpu=CPU gets used when gcc is invoked against .S files.
# Also pull in CFLAGS so we get -m<size> options set by the configuration.
+asflags += $(asflags-cpu) $(filter -g%,$(CFLAGS)) $(filter -m%,$(CFLAGS))
# Don't duplicate options.
+asflags := $(sort $(+asflags))
override ASFLAGS = $(+asflags)
sysdep_dirs = @sysdep_dirs@
# This is the precedence ordered list of subdirectories that configure
# selected for searching based upon machine, base_machine.
# Add the ieee754r and decNumberMath convenience directories to the list.
# Find each sysdep directory or convenience directory with a Makefile in it.
makefile_dirs := $(foreach odir,$(sysdep_dirs), $(dir $(wildcard $(top_srcdir)/$(odir)/Makefile))) $(top_srcdir)/decNumberMath/ \
$(top_srcdir)/ieee754r/ $(top_srcdir)/base-math/ $(top_srcdir)/libdecnumber/ \
$(top_srcdir)/printf-hooks/ $(top_srcdir)/stdlib/ $(top_srcdir)/tests/
# Like $makefile_dirs but add the $(top_srcdir) reference and strip out the redundant spaces.
# This has to be = assigned.
all_srcdirs = $(strip $(foreach dir,$(sysdep_dirs), $(top_srcdir)/$(dir))) \
$(top_srcdir)/libdecnumber $(top_srcdir)/printf-hooks $(top_srcdir)/stdlib \
$(top_srcdir)/decNumberMath $(top_srcdir)/ieee754r $(top_srcdir)/base-math $(top_srcdir)/ $(top_srcdir)/tests
backend_headers := libdecnumber
# For header files we want to search every directory that is relevant. We
# have to include $(top_builddir) in order to pick up the configure generated
# config.h.
system_header_dirs := dfp dfp/decimal
header_dirs := $(strip include $(system_header_dirs) $(backend_headers) $(sysdep_dirs) decNumberMath/ ieee754/ base-math/)
header_search_dirs := $(header_dirs:%=$(top_srcdir)/%) $(top_srcdir) $(top_builddir)
# GNU Make hack to reference a ' ' (space) character as the `from' function parameter in $(subst from,to,...).
sp :=
sp +=
# VPATH only needs to know the directory that source files are in. Headers
# are searched based on -I precedence during the compilation invocation.
VPATH := $(subst $(sp),:,$(all_srcdirs))
all: first libdfp libdecnumber/libdecnumber.a
# The sysdeps subdirs aren't recursively invoked, they're included so that
# they can add files to the libdfp_files list.
include $(foreach dir,$(makefile_dirs), $(dir)/Makefile )
# Fake rule to output the VPATH before we build anything. Don't use .PHONY
# because we want this printed each time.
first:
@echo VPATH=$(VPATH)
@echo Processing Makefiles: $(makefile_dirs)
# Yes this is a bit of a hack, but gcc/libdecnumber/Makefile won't allow
# CFLAGS to be overridden on a submake invocation.
BACKEND_CFLAGS=$(cflags-cpu) $(picflag)
libdecnumber/libdecnumber.a:
@echo "+Building DFP backend $@"
DEFS="-D__STDC_DEC_FP__=200704L $(CFLAGS-sysdeps) $(BACKEND_CFLAGS)" $(MAKE) -C libdecnumber -f Makefile.libdecnumber
libdfp: @enable_static@ @enable_shared@
static: $(top_builddir)/$(STATIC_LIB)
# Create the actual file with the version, the .so linker symlink and its
# SONAME symlink.
shared: $(top_builddir)/$(SHARED_REALNAME_LIB) \
$(top_builddir)/$(SHARED_LINKERNAME_LIB) \
$(top_builddir)/$(SHARED_SONAME_LIB)
@echo +Building shared lib and symlinks: $(notdir $^)
WARNS := -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-long-long
C_DEFINES := -D__STDC_WANT_DEC_FP__=1 -std=gnu11 -D__STDC_WANT_IEC_60559_DFP_EXT__=1 -D__STDC_WANT_IEC_60559_BFP_EXT__=1
ASM_DEFINES := -D__ELF__ -D__ASSEMBLER__ -DASSEMBLER -D__STDC_WANT_DEC_FP__=1 -D__STDC_WANT_IEC_60559_DFP_EXT__=1
CXX_DEFINES := -D__STDC_WANT_DEC_FP__=1 -D__STDC_WANT_IEC_60559_DFP_EXT__=1
CXX_WARNS := -W -Wall -Wwrite-strings -Wmissing-format-attribute -Wno-long-long
-include *.d
# Build the static object files.
.c.o:
$(CC) $(CFLAGS) $(sysdeps-CFLAGS) $(CPPFLAGS) -MT $@ -MD -MP -MF $*.d -c $< $(C_DEFINES) $(WARNS) -include $(top_builddir)/config.h -include $(top_srcdir)/include/libdfp-symbols.h $(foreach dir, $(header_search_dirs), -I$(dir)) -o $@
.S.o:
$(CC) $(CFLAGS) $(sysdeps-CFLAGS) $(ASFLAGS) -MT $@ -MD -MP -MF $*.d -c $< $(ASM_DEFINES) $(WARNS) -include $(top_builddir)/config.h -include $(top_srcdir)/include/libdfp-symbols.h $(foreach dir, $(header_search_dirs), -I$(dir)) -o $@
# Build the shared object files.
.c.os:
$(CC) $(CFLAGS) $(sysdeps-CFLAGS) $(CPPFLAGS) -MT $@ -MD -MP -MF $*.d -c $< $(C_DEFINES) $(WARNS) -include $(top_builddir)/config.h -include $(top_srcdir)/include/libdfp-symbols.h $(foreach dir, $(header_search_dirs), -I$(dir)) -o $@
.S.os:
$(CC) $(CFLAGS) $(sysdeps-CFLAGS) $(ASFLAGS) -MT $@ -MD -MP -MF $*.d -c $< $(ASM_DEFINES) $(WARNS) -include $(top_builddir)/config.h -include $(top_srcdir)/include/libdfp-symbols.h $(foreach dir, $(header_search_dirs), -I$(dir)) -o $@
# C++ compatibility test cases.
.cpp.os:
$(CXX) $(CXXFLAGS) $(CXXFLAGS-sysdeps) $(CPPFLAGS) -MT $@ -MD -MP -MF $*.d -c $< $(CXX_DEFINES) $(CXX_WARNS) -include $(top_srcdir)/include/libdfp-symbols.h -include $(top_builddir)/config.h $(foreach dir, $(header_search_dirs), -I$(dir)) -o $@
# Archive the static library and include all of the .o files from the backend
# archive. IF the backend has more than the base directory the .o detection
# mechanism will need to be more robust than this.
$(top_builddir)/$(STATIC_LIB): $(addsuffix .o,$(libdfp_files))
@echo +Creating static library $@
$(AR) rc $@ $(wordlist 2,$(words $^),$^)
@ranlibpath=`which $(RANLIB)`; \
if test -x "$$ranlibpath"; \
then $(RANLIB) $@; fi;
# Create libdfp.so -> libdfp.so.1 symlink.
$(top_builddir)/$(SHARED_LINKERNAME_LIB): $(top_builddir)/$(SHARED_REALNAME_LIB)
@echo "+Creating linker .so symlink $(notdir $@) -> $(notdir $<)"
ln -f -s $< $@
# Create libdfp.so.1 -> libdfp-1.0.1.so symlink.
$(top_builddir)/$(SHARED_SONAME_LIB): $(top_builddir)/$(SHARED_REALNAME_LIB)
@echo "+Create the library compat symlink $(notdir $@) -> $(notdir $<)"
ln -f -s $(notdir $<) $@
# Build the version tagged 'realname' shared object. This requires that the
# $(dfp_name).map file be composed out of individual Versions files. The
# -bsymbolic switch makes the library avoid using the PLT for intra-library
# calls.
$(top_builddir)/$(SHARED_REALNAME_LIB): $(top_builddir)/$(dfp_name).map $(addsuffix .os,$(libdfp_files))
@echo +Linking shared object files into $@.
$(CC) $(CFLAGS) $(sysdeps-CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SHARED_SONAME_LIB) -Bsymbolic -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--version-script,$(dfp_name).map -Wl,-entry=__libdfp_version $(addsuffix .os,$(libdfp_files)) -o $@ -lm -shared-libgcc
# The LIBDFP version script support is strongly based upon the GLIBC version
# script Makefile foo. Thank you Roland McGrath and Ulrich Drepper!
# Versions.def defines the package versions.
$(top_builddir)/Versions.all: $(..)scripts/firstversions.awk \
$(top_srcdir)/Versions.def
@echo +Creating $@ by running $(word 1,$^) against $(word 2,$^).
{ cat $(word 2,$^); } | LC_ALL=C $(AWK) -f $< > $@T
mv -f $@T $@
# Versions.sysdeps is a concatenation of all of the sysdep directory Versions
# files (that accompany a Makefile) and run through sed to strip comments. We
# use the wildcard function to verify that there actually is a Versions file
# accompanying a Makefile before we set it as a dependency. Some sysdeps dirs
# only add internal interfaces.
$(top_builddir)/Versions.sysdeps: $(top_srcdir)/Versions $(wildcard $(makefile_dirs:%=%Versions))
@echo +Scrubbing the following Versions files for comments and concatenating into a single $@ file.
sed '/^[ ]*%/!s/#.*$$//;/^[ ]*$$/d;s/^[ ]*%/#/' $^ > $@T
mv -f $@T $@
move-if-change = $(SHELL) $(top_srcdir)/scripts/move-if-change
# This runs versions.awk and generates libdfp.map from the Versions.all and
# Versions.sysdeps files.
$(top_builddir)/sysd-versions: $(top_builddir)/Versions.all \
$(top_builddir)/Versions.sysdeps \
$(..)scripts/versions.awk
@echo +The following invocation of $(word 3,$^) outputs $(dfp_name).map automagically.
( echo 'sysd-versions-subdirs = $(strip $(top_srcdir)/ $(makefile_dirs))'; \
cat $(top_builddir)/$(word 2,$^) \
| LC_ALL=C $(AWK) -v buildroot="$(top_builddir)/" -v defsfile=$< \
-v move_if_change='$(move-if-change)' \
-f $(word 3,$^) \
) > $@T
mv $@T $@
# This rule causes sysd-versions to be generated, which in turn invokes
# versions.awk which generates libdfp.map implicitly.
$(top_builddir)/libdfp.map: $(top_builddir)/sysd-versions
GLIBC_LIBS := -lc -lm
# Only enable C++ tests if compiler supports std::decimal (GCC 4.5+),
# otherwise just skip them.
ifeq ($(cxxdecimal), yes)
libdfp_cxx_tests = test-ostream test-ostream-g-spec test-istream
endif
libdfp_tests = $(libdfp_c_tests) $(libdfp_cxx_tests) check-abi-libdfp check-localplt
test-printf.os: $(top_builddir)/printf_dfp.os
test-strtod.os: $(top_builddir)/strtod32.os $(top_builddir)/strtod64.os $(top_builddir)/strtod128.os
# Empty rule which simply makes the libdfp_tests .so's dependent on
# tests/libdfp-test.c so that when the libdfp-test file changes all of the test .so
# files are rebuilt since almost all of them depend on the scaffold anyway.
$(addsuffix .os, $(libdfp_tests)): $(top_srcdir)/tests/libdfp-test.c
# The CPP test rely on the <dfp/decimal> header. If that changes then they
# need to be rebuilt.
$(addsuffix .os, $(libdfp_cxx_tests)): $(top_srcdir)/dfp/decimal/decimal $(top_srcdir)/dfp/float.h
# Explicitly link against the uninstalled GLIBC and the libdfp.so.1 we just
# built.
$(libdfp_c_tests): CFLAGS += -DNOT_IN_libdfp -I$(top_srcdir)/tests -Wl,--no-as-needed
$(libdfp_c_tests): %:%.os $(top_builddir)/$(SHARED_SONAME_LIB)
$(CC) $(CFLAGS) $(sysdeps-CFLAGS) $(top_builddir)/$(addsuffix .os,$@) -o $@ $(GLIBC_LIBS) -L$(top_builddir)/ -ldfp
# Explicitly link against the uninstalled GLIBC and the Libdfp.so.1 we just
# built.
$(libdfp_cxx_tests): CXXFLAGS += -DNOT_IN_libdfp -I$(top_srcdir)/tests -Wl,--no-as-needed
$(libdfp_cxx_tests): %:%.os $(top_builddir)/$(SHARED_SONAME_LIB)
$(CXX) $(CXXFLAGS) $(CXXFLAGS-sysdeps) $(top_builddir)/$(addsuffix .os,$@) -o $@ $(GLIBC_LIBS) -L$(top_builddir)/ -ldfp
# The name to give to a test in test results summaries.
test-name = $(strip $(patsubst %.out, %, $@))
# Likewise, in XFAIL variable names.
test-xfail-name = $(strip $(patsubst %.out, %, $@))
evaluate-test = $(top_srcdir)/scripts/evaluate-test.sh $(test-name) $$? \
$(if $(test-xfail-$(test-xfail-name)),true,false) \
false \
> $(top_builddir)/$(test-name).test-result
# Make check main rule
%.out: %
LD_LIBRARY_PATH=$(top_builddir)/:$$LD_LIBRARY_PATH $(top_builddir)/$(test-name) \
$(test-extra-opts) 2> $(top_builddir)/$@ 1> /dev/null; \
$(evaluate-test)
# Check ABI rules
.PRECIOUS: %.symlist
generated += $(extra-libs:=.symlist)
vpath %.abilist $(+sysdeps_dirs)
check-abi-libdfp.out: libdfp.abilist libdfp.symlist
diff -p -U 0 $(filter %.abilist,$^) $(filter %.symlist,$^) > $@; \
$(evaluate-test)
%.symlist: $(top_srcdir)/scripts/abilist.awk %.dynsym
LC_ALL=C $(AWK) -f $^ > $@T
mv -f $@T $@
%.dynsym: %.so
LC_ALL=C $(OBJDUMP) --dynamic-syms $< > $@T
mv -f $@T $@
# Check local PLT calls
vpath localplt.data $(+sysdep_dirs)
check-localplt.out: $(top_srcdir)/scripts/check-localplt.awk \
$(top_srcdir)/scripts/localplt.awk \
libdfp.so.jmprel \
localplt.data
LC_ALL=C $(AWK) -f $(filter-out $< %localplt.data,$^) | \
LC_ALL=C $(AWK) -f $< $(filter %localplt.data,$^) - \
> $@; \
$(evaluate-test)
libdfp.so.jmprel: libdfp.so
@rm -f $@T
LC_ALL=C $(READELF) -W -S -d -r $< > $@T
test -s $@T
mv -f $@T $@
define summarize-tests
@egrep -v '^(PASS|XFAIL):' $(top_builddir)/$1 || true
@echo "Summary of test results$2:"
@sed 's/:.*//' < $(top_builddir)/$1 | sort | uniq -c
@! egrep -q -v '^(X?PASS|XFAIL|UNSUPPORTED):' $(top_builddir)/$1
endef
tests: $(libdfp_tests:%=%.out)
$(top_srcdir)/scripts/merge-test-results.sh -s $(top_builddir)/ "" \
$(sort $(libdfp_tests)) \
> tests.sum
@echo Details of failed tests:
@awk -v builddir=$(top_builddir) \
'{ if ($$1 != "PASS:") printf "%s/%s.out ", builddir, $$2; }' \
tests.sum | xargs -n 1 -t cat
$(call summarize-tests,tests.sum)
# The .out files are predicated in another rule on the actual test executables, so
# those are built from those rules.
check: tests
# Build all tests, but do not try running them (excepting ABI/PLT checks)
cross-tests = check-localplt check-abi-libdfp
cross-check: $(filter-out $(cross-tests),$(libdfp_tests)) $(cross-tests:%=%.out)
$(top_srcdir)/scripts/merge-test-results.sh -s $(top_builddir)/ "" \
$(sort $(cross-tests)) > tests.sum
@echo Details of failed tests:
@awk -v builddir=$(top_builddir) \
'{ if ($$1 != "PASS:") printf "%s/%s.out ", builddir, $$2; }' \
tests.sum | xargs -n 1 -t cat
$(call summarize-tests,tests.sum)
.PHONY: check cross-check
clean:
rm -f *.o
rm -f *.os
rm -f *.d
rm -f $(STATIC_LIB)
rm -f $(SHARED_LINKERNAME_LIB)
rm -f $(SHARED_SONAME_LIB)
rm -f $(SHARED_REALNAME_LIB)
rm -f Versions.all
rm -f Versions.sysdeps
rm -f libdfp.map $(SHARED_LINKERNAME_LIB).jmprel libdfp.symlist
rm -f Versions.tmp
rm -f sysd-versions
rm -f $(addsuffix .out,$(libdfp_tests))
rm -f $(addsuffix .test-result,$(libdfp_tests))
rm -f $(addsuffix .conf,$(libdfp_tests))
rm -f $(libdfp_tests)
rm -f libdfp-test-ulps.h
rm -f *.ulp
rm -f $(top_builddir)/libdecnumber/*.o
rm -f $(top_builddir)/libdecnumber/*.a
.PHONY: clean
# distclean cleans up the files added by configure.
distclean:
rm -f $(top_builddir)/config.h
rm -f $(top_builddir)/config.log
rm -f $(top_builddir)/config.status
rm -f $(top_builddir)/Makefile
rm -f $(top_builddir)/libdecnumber/config.log
rm -f $(top_builddir)/libdecnumber/config.status
rm -f $(top_builddir)/libdecnumber/libdecnumberconfig/config.h
rm -d $(top_builddir)/libdecnumber/libdecnumberconfig/
rm -f $(top_builddir)/libdecnumber/gstdint.h
rm -f $(top_builddir)/libdecnumber/Makefile.libdecnumber
rm -f $(top_builddir)/libdecnumber/stamp-h1
rm -f $(top_builddir)/libdecnumber.pc
rm -f $(top_builddir)/libdfp.pc
.PHONY: distclean
install: all install-doc install-headers
$(INSTALL) -d $(inst_libdir)
ifeq ("@enable_static@","static")
$(INSTALL_DATA) -t $(inst_libdir) $(top_builddir)/$(STATIC_LIB)
endif
$(INSTALL) -t $(inst_libdir) $(top_builddir)/$(SHARED_REALNAME_LIB)
$(INSTALL_DATA) -t $(inst_libdir) $(top_builddir)/libdecnumber/libdecnumber.a
ln -f -s $(SHARED_REALNAME_LIB) $(inst_libdir)/$(SHARED_LINKERNAME_LIB)
ln -f -s $(SHARED_REALNAME_LIB) $(inst_libdir)/$(SHARED_SONAME_LIB)
$(INSTALL_DATA) -D -t $(inst_libdir)/pkgconfig $(top_builddir)/libdfp.pc
$(INSTALL_DATA) -D -t $(inst_libdir)/pkgconfig $(top_builddir)/libdecnumber.pc
.PHONY: install
install-headers:
$(INSTALL) -d $(inst_includedir)
$(INSTALL) -d $(inst_includedir)/dfp
$(INSTALL) -d $(inst_includedir)/dfp/bits
$(INSTALL) -d $(inst_includedir)/dfp/decimal
$(INSTALL_DATA) -t $(inst_includedir)/dfp $(top_srcdir)/dfp/*.h
$(INSTALL_DATA) -t $(inst_includedir)/dfp/bits $(top_srcdir)/dfp/bits/*.h
$(INSTALL_DATA) -t $(inst_includedir)/dfp/decimal/ $(top_srcdir)/dfp/decimal/*
$(INSTALL) -d $(inst_includedir)/decnumber/
$(INSTALL_DATA) -t $(inst_includedir)/decnumber/ $(top_srcdir)/libdecnumber/decContext.h
$(INSTALL_DATA) -t $(inst_includedir)/decnumber/ $(top_srcdir)/libdecnumber/decConvert.h
$(INSTALL_DATA) -t $(inst_includedir)/decnumber/ $(top_srcdir)/libdecnumber/decNumber.h
.PHONY: install-headers
install-doc:
$(INSTALL) -d $(inst_docdir)dfp/
$(INSTALL_DATA) -t $(inst_docdir)dfp/ $(top_srcdir)/README.user
mv $(inst_docdir)dfp/README.user $(inst_docdir)dfp/README
$(INSTALL_DATA) -t $(inst_docdir)dfp/ $(top_srcdir)/COPYING.txt
$(INSTALL_DATA) -t $(inst_docdir)dfp/ $(top_srcdir)/COPYING.libdfp.txt
$(INSTALL_DATA) -t $(inst_docdir)dfp/ $(top_srcdir)/COPYING.libdecnumber.txt
$(INSTALL_DATA) -t $(inst_docdir)dfp/ $(top_srcdir)/COPYING3
$(INSTALL_DATA) -t $(inst_docdir)dfp/ $(top_srcdir)/COPYING.RUNTIME
if [ ! -e $(top_srcdir)/ChangeLog.md ]; then \
(cd $(top_srcdir) && ./generate-changelog.sh); \
else \
cat $(top_srcdir)/ChangeLog.md; \
fi > $(inst_docdir)dfp/ChangeLog.md
.PHONY: install-doc
# Clean out the existing .SUFFIXES setting.
.SUFFIXES:
# Prioritize .S over .c when searching for target files. The .os suffix
# is used for shared object file and the .o suffix is for static object files.
.SUFFIXES: .S .c .cpp .o .os