1 ## Process this with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = cygnus
7 EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
8 src/mips/n32.s src/mips/o32.S src/mips/o32.s \
9 src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
10 src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
11 src/x86/ffi64.c src/x86/unix64.S \
12 src/alpha/ffi.c src/alpha/osf.S \
13 src/m68k/ffi.c src/m68k/sysv.S \
14 src/powerpc/ffi.c src/powerpc/sysv.S \
15 src/powerpc/ppc_closure.S src/powerpc/asm.h \
16 src/powerpc/ffi_darwin.c \
17 src/powerpc/darwin.S src/powerpc/aix.S \
18 src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
19 src/arm/ffi.c src/arm/sysv.S \
20 src/s390/ffi.c src/s390/sysv.S \
21 src/sh/ffi.c src/sh/sysv.S
23 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
25 ## ################################################################
28 ## This section is for make and multilib madness.
31 # Work around what appears to be a GNU make bug handling MAKEFLAGS
32 # values defined in terms of make variables, as is the case for CC and
33 # friends when we are called from the top level Makefile.
35 "AR_FLAGS=$(AR_FLAGS)" \
36 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
38 "CXXFLAGS=$(CXXFLAGS)" \
39 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
40 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
41 "INSTALL=$(INSTALL)" \
42 "INSTALL_DATA=$(INSTALL_DATA)" \
43 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
44 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
45 "JC1FLAGS=$(JC1FLAGS)" \
46 "LDFLAGS=$(LDFLAGS)" \
47 "LIBCFLAGS=$(LIBCFLAGS)" \
48 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
50 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
51 "PICFLAG=$(PICFLAG)" \
52 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
54 "exec_prefix=$(exec_prefix)" \
55 "infodir=$(infodir)" \
63 "LIBCFLAGS=$(LIBCFLAGS)" \
65 "PICFLAG=$(PICFLAG)" \
71 # Multilib support variables.
79 toolexeclib_LTLIBRARIES = libffi.la
80 noinst_LTLIBRARIES = libffi_convenience.la
82 noinst_PROGRAMS = ffitest
84 ffitest_OBJECTS = ffitest.lo
85 ffitest_LDADD = libffi.la
86 ffitest_LDFLAGS = -shared-libgcc
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
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
105 ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
106 ## Work around automake deficiency
107 libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
108 src/raw_api.c src/java_raw_api.c
110 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
111 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
114 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
115 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
118 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
119 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
122 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
123 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
126 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
127 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
130 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
131 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
134 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
135 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
138 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
139 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
142 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
143 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
146 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
147 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
150 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
151 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
154 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
155 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
158 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
159 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
162 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
163 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
166 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
167 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
170 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
171 libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
174 AM_CFLAGS = -fexceptions
176 libffi_la_LDFLAGS = -release $(VERSION)
178 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
180 # Override these rules so that object files get put in the correct
183 $(LTCOMPILE) -c -o $@ $<
186 $(LTCOMPILE) -c -o $@ $<
189 $(LTCOMPILE) -c -o $@ $<
192 $(LTCOMPILE) -c -o $@ $<
195 $(LTCOMPILE) -c -o $@ $<
198 $(LTCOMPILE) -c -o $@ $<
201 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
202 maintainer-clean-multi
204 all-recursive: all-multi
205 install-recursive: install-multi
206 mostlyclean-recursive: mostlyclean-multi
207 clean-recursive: clean-multi
208 distclean-recursive: distclean-multi
209 maintainer-clean-recursive: maintainer-clean-multi
212 : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
214 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
216 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
218 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
220 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
221 maintainer-clean-multi:
222 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
225 ## ################################################################