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/alpha/ffi.c src/alpha/osf.S \
12 src/m68k/ffi.c src/m68k/sysv.S \
13 src/powerpc/ffi.c src/powerpc/sysv.S \
14 src/powerpc/ppc_closure.S src/powerpc/asm.h \
15 src/powerpc/ffi_darwin.c \
16 src/powerpc/darwin.S src/powerpc/aix.S \
17 src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
18 src/arm/ffi.c src/arm/sysv.S \
19 src/s390/ffi.c src/s390/sysv.S
21 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
23 ## ################################################################
26 ## This section is for make and multilib madness.
29 # Work around what appears to be a GNU make bug handling MAKEFLAGS
30 # values defined in terms of make variables, as is the case for CC and
31 # friends when we are called from the top level Makefile.
33 "AR_FLAGS=$(AR_FLAGS)" \
34 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
36 "CXXFLAGS=$(CXXFLAGS)" \
37 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
38 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
39 "INSTALL=$(INSTALL)" \
40 "INSTALL_DATA=$(INSTALL_DATA)" \
41 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
42 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
43 "JC1FLAGS=$(JC1FLAGS)" \
44 "LDFLAGS=$(LDFLAGS)" \
45 "LIBCFLAGS=$(LIBCFLAGS)" \
46 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
48 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
49 "PICFLAG=$(PICFLAG)" \
50 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
52 "exec_prefix=$(exec_prefix)" \
53 "infodir=$(infodir)" \
61 "LIBCFLAGS=$(LIBCFLAGS)" \
63 "PICFLAG=$(PICFLAG)" \
69 # Multilib support variables.
77 ## Install a library built with a cross compiler in tooldir, not
80 toolexeclibdir = $(libdir)$(MULTISUBDIR)
82 toolexecdir = $(exec_prefix)/$(target_alias)
83 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
86 toolexeclib_LTLIBRARIES = libffi.la
87 noinst_LTLIBRARIES = libffi_convenience.la
89 noinst_PROGRAMS = ffitest
91 ffitest_OBJECTS = ffitest.lo
92 ffitest_LDADD = libffi.la
93 ffitest_LDFLAGS = -shared-libgcc
95 TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
96 TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
97 TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
98 TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
99 TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
100 TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
101 TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
102 TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
103 TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
104 TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
105 TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
106 TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
107 TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
109 ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
110 ## Work around automake deficiency
111 libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
112 src/raw_api.c src/java_raw_api.c
114 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
115 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
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 AM_CFLAGS = -fexceptions
168 libffi_la_LDFLAGS = -release $(VERSION)
170 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
172 # Override these rules so that object files get put in the correct
175 $(LTCOMPILE) -c -o $@ $<
178 $(LTCOMPILE) -c -o $@ $<
181 $(LTCOMPILE) -c -o $@ $<
184 $(LTCOMPILE) -c -o $@ $<
187 $(LTCOMPILE) -c -o $@ $<
190 $(LTCOMPILE) -c -o $@ $<
193 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
194 maintainer-clean-multi
196 all-recursive: all-multi
197 install-recursive: install-multi
198 mostlyclean-recursive: mostlyclean-multi
199 clean-recursive: clean-multi
200 distclean-recursive: distclean-multi
201 maintainer-clean-recursive: maintainer-clean-multi
204 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
206 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
208 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
210 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
212 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
213 maintainer-clean-multi:
214 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
217 ## ################################################################