1 ## Process this with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = cygnus
5 SUBDIRS = include testsuite
7 EXTRA_DIST = LICENSE ChangeLog.v1 \
8 src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
9 src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
10 src/mips/ffi.c src/mips/n32.S src/mips/o32.S \
11 src/mips/ffitarget.h \
12 src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \
13 src/powerpc/ffi.c src/powerpc/sysv.S \
14 src/powerpc/linux64.S src/powerpc/linux64_closure.S \
15 src/powerpc/ppc_closure.S src/powerpc/asm.h \
16 src/powerpc/aix.S src/powerpc/darwin.S \
17 src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
18 src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
19 src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
20 src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h \
21 src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \
22 src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
24 src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
25 src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h
28 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
30 ## ################################################################
33 ## This section is for make and multilib madness.
36 # Work around what appears to be a GNU make bug handling MAKEFLAGS
37 # values defined in terms of make variables, as is the case for CC and
38 # friends when we are called from the top level Makefile.
40 "AR_FLAGS=$(AR_FLAGS)" \
41 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
43 "CXXFLAGS=$(CXXFLAGS)" \
44 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
45 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
46 "INSTALL=$(INSTALL)" \
47 "INSTALL_DATA=$(INSTALL_DATA)" \
48 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
49 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
50 "JC1FLAGS=$(JC1FLAGS)" \
51 "LDFLAGS=$(LDFLAGS)" \
52 "LIBCFLAGS=$(LIBCFLAGS)" \
53 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
55 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
56 "PICFLAG=$(PICFLAG)" \
57 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
58 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
60 "exec_prefix=$(exec_prefix)" \
61 "infodir=$(infodir)" \
69 "LIBCFLAGS=$(LIBCFLAGS)" \
71 "PICFLAG=$(PICFLAG)" \
77 # Multilib support variables.
85 toolexeclib_LTLIBRARIES = libffi.la
86 noinst_LTLIBRARIES = libffi_convenience.la
90 TARGET_SRC_MIPS_IRIX = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
91 TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.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
105 TARGET_SRC_SH64 = src/sh64/sysv.S src/sh64/ffi.c
107 ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
108 ## Work around automake deficiency
109 libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
110 src/raw_api.c src/java_raw_api.c
112 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_IRIX)
113 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_IRIX)
116 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
117 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
120 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
121 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
124 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
125 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
128 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
129 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
132 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
133 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
136 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
137 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
140 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
141 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
144 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
145 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
148 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
149 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
152 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
153 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
156 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
157 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
160 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
161 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
164 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
165 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
168 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
169 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
172 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH64)
173 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH64)
176 AM_CFLAGS = -Wall -g -fexceptions
178 libffi_la_LDFLAGS = -release $(VERSION)
180 INCLUDES = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
182 # Override these rules so that object files get put in the correct
185 $(LTCOMPILE) -c -o $@ $<
188 $(LTCOMPILE) -c -o $@ $<
191 $(LTCOMPILE) -c -o $@ $<
194 $(LTCOMPILE) -c -o $@ $<
197 $(LTCOMPILE) -c -o $@ $<
200 $(LTCOMPILE) -c -o $@ $<
203 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
204 maintainer-clean-multi
206 all-recursive: all-multi
207 install-recursive: install-multi
208 mostlyclean-recursive: mostlyclean-multi
209 clean-recursive: clean-multi
210 distclean-recursive: distclean-multi
211 maintainer-clean-recursive: maintainer-clean-multi
214 : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
216 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
218 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
220 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
222 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
223 maintainer-clean-multi:
224 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
227 ## ################################################################
229 # Our hacked automake doesn't clean subdirectories properly.
230 mostlyclean-am: mostlyclean-sub
232 -rm -f src/*.o src/*.lo
233 -rm -f src/@TARGETDIR@/*.o src/@TARGETDIR@/*.lo
237 -rm -rf src/.libs src/_libs
238 -rm -rf src/@TARGETDIR@/.libs src/@TARGETDIR@/_libs