* floatformat.c (floatformat_is_valid): New function.
[official-gcc.git] / libffi / Makefile.am
blobcb05ea6d1a4df9e566f76afa26208342db3046cc
1 ## Process this with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = cygnus
5 SUBDIRS = include testsuite
8 EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
9                 src/mips/n32.s src/mips/o32.S src/mips/o32.s \
10                 src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
11                 src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
12                 src/x86/ffi64.c src/x86/unix64.S \
13                 src/alpha/ffi.c src/alpha/osf.S \
14                 src/m68k/ffi.c src/m68k/sysv.S \
15                 src/powerpc/ffi.c src/powerpc/sysv.S \
16                 src/powerpc/linux64.S src/powerpc/linux64_closure.S \
17                 src/powerpc/ppc_closure.S src/powerpc/asm.h \
18                 src/powerpc/ffi_darwin.c \
19                 src/powerpc/darwin.S src/powerpc/aix.S \
20                 src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
21                 src/arm/ffi.c src/arm/sysv.S \
22                 src/s390/ffi.c src/s390/sysv.S \
23                 src/sh/ffi.c src/sh/sysv.S \
24                 src/sh64/ffi.c src/sh64/sysv.S
26 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
28 ## ################################################################
31 ## This section is for make and multilib madness.
34 # Work around what appears to be a GNU make bug handling MAKEFLAGS
35 # values defined in terms of make variables, as is the case for CC and
36 # friends when we are called from the top level Makefile.
37 AM_MAKEFLAGS = \
38         "AR_FLAGS=$(AR_FLAGS)" \
39         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
40         "CFLAGS=$(CFLAGS)" \
41         "CXXFLAGS=$(CXXFLAGS)" \
42         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
43         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
44         "INSTALL=$(INSTALL)" \
45         "INSTALL_DATA=$(INSTALL_DATA)" \
46         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
47         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
48         "JC1FLAGS=$(JC1FLAGS)" \
49         "LDFLAGS=$(LDFLAGS)" \
50         "LIBCFLAGS=$(LIBCFLAGS)" \
51         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
52         "MAKE=$(MAKE)" \
53         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
54         "PICFLAG=$(PICFLAG)" \
55         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
56         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
57         "SHELL=$(SHELL)" \
58         "exec_prefix=$(exec_prefix)" \
59         "infodir=$(infodir)" \
60         "libdir=$(libdir)" \
61         "prefix=$(prefix)" \
62         "AR=$(AR)" \
63         "AS=$(AS)" \
64         "CC=$(CC)" \
65         "CXX=$(CXX)" \
66         "LD=$(LD)" \
67         "LIBCFLAGS=$(LIBCFLAGS)" \
68         "NM=$(NM)" \
69         "PICFLAG=$(PICFLAG)" \
70         "RANLIB=$(RANLIB)" \
71         "DESTDIR=$(DESTDIR)"
73 MAKEOVERRIDES=
75 # Multilib support variables.
76 MULTISRCTOP =
77 MULTIBUILDTOP =
78 MULTIDIRS =
79 MULTISUBDIR =
80 MULTIDO = true
81 MULTICLEAN = true
83 toolexeclib_LTLIBRARIES = libffi.la
84 noinst_LTLIBRARIES = libffi_convenience.la
88 TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
89 TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
90 TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
91 TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
92 TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
93 TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
94 TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
95 TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
96 TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
97 TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
98 TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
99 TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
100 TARGET_SRC_ARM =  src/arm/sysv.S src/arm/ffi.c
101 TARGET_SRC_S390 =  src/s390/sysv.S src/s390/ffi.c
102 TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
103 TARGET_SRC_SH =  src/sh/sysv.S src/sh/ffi.c
104 TARGET_SRC_SH64 =  src/sh64/sysv.S src/sh64/ffi.c
106 ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
107 ## Work around automake deficiency
108 libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
109                 src/raw_api.c src/java_raw_api.c
110 if MIPS_GCC
111 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
112 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
113 endif
114 if MIPS_LINUX
115 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
116 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
117 endif
118 if MIPS_SGI
119 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
120 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
121 endif
122 if X86
123 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
124 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
125 endif
126 if X86_WIN32
127 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
128 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
129 endif
130 if SPARC
131 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
132 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
133 endif
134 if ALPHA
135 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
136 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
137 endif
138 if IA64
139 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
140 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
141 endif
142 if M68K
143 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
144 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
145 endif
146 if POWERPC
147 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
148 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
149 endif
150 if POWERPC_AIX
151 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
152 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
153 endif
154 if POWERPC_DARWIN
155 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
156 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
157 endif
158 if ARM
159 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
160 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
161 endif
162 if S390
163 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
164 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
165 endif
166 if X86_64
167 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
168 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
169 endif
170 if SH
171 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
172 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
173 endif
174 if SH64
175 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH64)
176 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH64)
177 endif
179 AM_CFLAGS = -Wall -g -fexceptions
181 libffi_la_LDFLAGS = -release $(VERSION) 
183 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
185 # Override these rules so that object files get put in the correct 
186 # subdirectories. 
187 .c.o:
188         $(LTCOMPILE) -c -o $@ $<
190 .s.o:
191         $(LTCOMPILE) -c -o $@ $<
193 .S.o:
194         $(LTCOMPILE) -c -o $@ $<
196 .c.lo:
197         $(LTCOMPILE) -c -o $@ $<
199 .s.lo:
200         $(LTCOMPILE) -c -o $@ $<
202 .S.lo:
203         $(LTCOMPILE) -c -o $@ $<
205 # Multilib support.
206 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
207         maintainer-clean-multi
209 all-recursive: all-multi
210 install-recursive: install-multi
211 mostlyclean-recursive: mostlyclean-multi
212 clean-recursive: clean-multi
213 distclean-recursive: distclean-multi
214 maintainer-clean-recursive: maintainer-clean-multi
216 all-multi:
217         : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
218 install-multi:
219         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
220 mostlyclean-multi:
221         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
222 clean-multi:
223         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
224 distclean-multi:
225         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
226 maintainer-clean-multi:
227         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
230 ## ################################################################
232 CLEANFILES = $(libffi_convenience_la_OBJECTS)           \
233              $(libffi_la_OBJECTS)                       \
234              $(libffi_convenience_la_OBJECTS:.lo=.o)    \
235              $(libffi_la_OBJECTS:.lo=.o)