2 # Makefile for libdecnumber. Run 'configure' to generate Makefile from Makefile.in
4 # Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
6 #This file is part of GCC.
8 #GCC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
13 #GCC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GCC; see the file COPYING. If not, write to
20 #the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21 #Boston MA 02110-1301, USA.
33 AUTOHEADER = @AUTOHEADER@
36 WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
39 INSTALL_DATA = @INSTALL_DATA@
40 INSTALL_PROGRAM = @INSTALL_PROGRAM@
47 datarootdir = @datarootdir@
49 exec_prefix = @prefix@
51 localedir = $(datadir)/locale
54 ADDITIONAL_OBJS = @ADDITIONAL_OBJS@
56 enable_decimal_float= @enable_decimal_float@
58 INCLUDES = -I$(srcdir) -I.
60 ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
62 bid_OBJS = bid2dpd_dpd2bid.o host-ieee32.o host-ieee64.o host-ieee128.o
64 libdecnumber_a_OBJS = decNumber.o decContext.o \
65 decimal32.o decimal64.o decimal128.o $(ADDITIONAL_OBJS)
67 libdecnumber_a_SOURCES = decContext.c decContext.h decDPD.h \
68 decNumber.c decNumber.h decNumberLocal.h \
69 decContextSymbols.h decDPDSymbols.h decNumberSymbols.h \
70 dpd/decimal128.c dpd/decimal128.h dpd/decimal128Symbols.h \
71 dpd/decimal32.c dpd/decimal32.h dpd/decimal32Symbols.h \
72 dpd/decimal64.c dpd/decimal64.h dpd/decimal64Symbols.h \
73 bid/decimal128.c bid/decimal128.h \
74 bid/decimal32.c bid/decimal32.h \
75 bid/decimal64.c bid/decimal64.h
82 libdecnumber.a: $(libdecnumber_a_OBJS)
84 $(AR) $(ARFLAGS) $@ $(libdecnumber_a_OBJS)
87 # Rules to rebuild the configuration
89 Makefile: $(srcdir)/Makefile.in config.status
90 $(SHELL) ./config.status Makefile
92 config.status: $(srcdir)/configure
93 $(SHELL) ./config.status --recheck
95 $(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
96 cd $(srcdir) && $(AUTOCONF)
98 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/stdint.m4 \
99 $(srcdir)/../config/warnings.m4 $(srcdir)/../config/override.m4 \
100 $(srcdir)/configure.ac
101 cd $(srcdir) && $(ACLOCAL) -I ../config
104 test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1)
106 stamp-h1: $(srcdir)/config.in config.status
108 $(SHELL) ./config.status config.h
110 $(srcdir)/config.in: @MAINT@ $(srcdir)/configure
111 cd $(srcdir) && $(AUTOHEADER)
116 decContext.o: decContext.c decContext.h decNumberLocal.h \
118 decNumber.o: decNumber.c decNumber.h decContext.h decNumberLocal.h \
120 decimal32.o: $(srcdir)/$(enable_decimal_float)/decimal32.c \
121 $(srcdir)/$(enable_decimal_float)/decimal32.h \
122 $(srcdir)/$(enable_decimal_float)/decimal32Symbols.h \
123 decNumber.h decContext.h decNumberLocal.h
124 $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal32.c
125 decimal64.o: $(srcdir)/$(enable_decimal_float)/decimal64.c \
126 $(srcdir)/$(enable_decimal_float)/decimal64.h \
127 $(srcdir)/$(enable_decimal_float)/decimal64Symbols.h \
128 decNumber.h decContext.h decNumberLocal.h
129 $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal64.c
130 decimal128.o: $(srcdir)/$(enable_decimal_float)/decimal128.c \
131 $(srcdir)/$(enable_decimal_float)/decimal128.h \
132 $(srcdir)/$(enable_decimal_float)/decimal128Symbols.h\
133 $(srcdir)/$(enable_decimal_float)/decimal128Local.h\
134 decNumber.h decContext.h decNumberLocal.h
135 $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal128.c
136 bid2dpd_dpd2bid.o : $(srcdir)/bid/bid2dpd_dpd2bid.c $(srcdir)/bid/bid2dpd_dpd2bid.h
137 $(COMPILE) $(srcdir)/bid/bid2dpd_dpd2bid.c
138 host-ieee32.o : $(srcdir)/bid/host-ieee32.c $(srcdir)/bid/decimal32.h
139 $(COMPILE) $(srcdir)/bid/host-ieee32.c
140 host-ieee64.o : $(srcdir)/bid/host-ieee64.c $(srcdir)/bid/decimal64.h
141 $(COMPILE) $(srcdir)/bid/host-ieee64.c
142 host-ieee128.o : $(srcdir)/bid/host-ieee128.c $(srcdir)/bid/decimal128.h
143 $(COMPILE) $(srcdir)/bid/host-ieee128.c
144 # Other miscellaneous targets.
150 -rm -rf libdecnumber.a $(srcdir)/autom4te.cache
153 -rm -f config.h stamp-h1 config.status config.cache config.log \
154 configure.lineno configure.status.lineno Makefile localedir.h \
155 localedir.hs gstdint.h
157 maintainer-clean: distclean
158 @echo "This command is intended for maintainers to use"
159 @echo "it deletes files that may require special tools to rebuild."
160 -rm -f $(srcdir)/configure $(srcdir)/aclocal.m4
174 .PHONY: installdirs install install-strip mostlyclean clean distclean \
175 maintainer-clean check installcheck dvi pdf html info install-info \
176 install-pdf install-man update-po install-html
178 COMPILE = source='$<' object='$@' libtool=no $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALL_CFLAGS) -c
185 # Tell versions [3.59,3.63) of GNU make to not export all variables.
186 # Otherwise a system limit (for SysV at least) may be exceeded.