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/linux64.S src/powerpc/linux64_closure.S \
16 src/powerpc/ppc_closure.S src/powerpc/asm.h \
17 src/powerpc/ffi_darwin.c \
18 src/powerpc/darwin.S src/powerpc/aix.S \
19 src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
20 src/arm/ffi.c src/arm/sysv.S \
21 src/s390/ffi.c src/s390/sysv.S \
22 src/sh/ffi.c src/sh/sysv.S
24 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
26 ## ################################################################
29 ## This section is for make and multilib madness.
32 # Work around what appears to be a GNU make bug handling MAKEFLAGS
33 # values defined in terms of make variables, as is the case for CC and
34 # friends when we are called from the top level Makefile.
36 "AR_FLAGS=$(AR_FLAGS)" \
37 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
39 "CXXFLAGS=$(CXXFLAGS)" \
40 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
41 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
42 "INSTALL=$(INSTALL)" \
43 "INSTALL_DATA=$(INSTALL_DATA)" \
44 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
45 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
46 "JC1FLAGS=$(JC1FLAGS)" \
47 "LDFLAGS=$(LDFLAGS)" \
48 "LIBCFLAGS=$(LIBCFLAGS)" \
49 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
51 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
52 "PICFLAG=$(PICFLAG)" \
53 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
55 "exec_prefix=$(exec_prefix)" \
56 "infodir=$(infodir)" \
64 "LIBCFLAGS=$(LIBCFLAGS)" \
66 "PICFLAG=$(PICFLAG)" \
72 # Multilib support variables.
80 toolexeclib_LTLIBRARIES = libffi.la
81 noinst_LTLIBRARIES = libffi_convenience.la
83 noinst_PROGRAMS = ffitest
85 ffitest_OBJECTS = ffitest.lo
86 ffitest_LDADD = libffi.la
87 ffitest_LDFLAGS = -shared-libgcc
89 TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
90 TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
91 TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
92 TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
93 TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
94 TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
95 TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
96 TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
97 TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
98 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
99 TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
100 TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
101 TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
102 TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
103 TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
104 TARGET_SRC_SH = src/sh/sysv.S src/sh/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
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)
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)
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)
123 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
124 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
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)
131 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
132 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
135 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
136 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
139 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
140 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
143 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
144 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
147 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
148 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
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)
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)
159 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
160 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
163 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
164 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
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)
171 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
172 libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
175 AM_CFLAGS = -fexceptions
177 libffi_la_LDFLAGS = -release $(VERSION)
179 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
181 # Override these rules so that object files get put in the correct
184 $(LTCOMPILE) -c -o $@ $<
187 $(LTCOMPILE) -c -o $@ $<
190 $(LTCOMPILE) -c -o $@ $<
193 $(LTCOMPILE) -c -o $@ $<
196 $(LTCOMPILE) -c -o $@ $<
199 $(LTCOMPILE) -c -o $@ $<
202 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
203 maintainer-clean-multi
205 all-recursive: all-multi
206 install-recursive: install-multi
207 mostlyclean-recursive: mostlyclean-multi
208 clean-recursive: clean-multi
209 distclean-recursive: distclean-multi
210 maintainer-clean-recursive: maintainer-clean-multi
213 : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
215 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
217 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
219 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
221 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
222 maintainer-clean-multi:
223 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
226 ## ################################################################