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 \
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 src/powerpc/asm.h \
14 src/arm/ffi.c src/arm/sysv.S
16 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
18 ## ################################################################
21 ## This section is for make and multilib madness.
24 # Work around what appears to be a GNU make bug handling MAKEFLAGS
25 # values defined in terms of make variables, as is the case for CC and
26 # friends when we are called from the top level Makefile.
28 "AR_FLAGS=$(AR_FLAGS)" \
29 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
31 "CXXFLAGS=$(CXXFLAGS)" \
32 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
33 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
34 "INSTALL=$(INSTALL)" \
35 "INSTALL_DATA=$(INSTALL_DATA)" \
36 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
37 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
38 "JC1FLAGS=$(JC1FLAGS)" \
39 "LDFLAGS=$(LDFLAGS)" \
40 "LIBCFLAGS=$(LIBCFLAGS)" \
41 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
43 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
44 "PICFLAG=$(PICFLAG)" \
45 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
47 "exec_prefix=$(exec_prefix)" \
48 "infodir=$(infodir)" \
56 "LIBCFLAGS=$(LIBCFLAGS)" \
58 "PICFLAG=$(PICFLAG)" \
64 # Multilib support variables.
72 ## Install a library built with a cross compiler in tooldir, not
75 toolexeclibdir = $(libdir)$(MULTISUBDIR)
77 toolexecdir = $(exec_prefix)/$(target_alias)
78 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
81 toolexeclib_LTLIBRARIES = libffi.la
83 noinst_PROGRAMS = ffitest
85 ffitest_SOURCES = src/ffitest.c
86 ffitest_LDADD = libffi.la
88 TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
89 TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
90 TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
91 TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
92 TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
93 TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
94 TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
95 TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S
96 TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
98 ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
99 ## Work around automake deficiency
100 libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
101 src/raw_api.c src/java_raw_api.c
103 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
106 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
109 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
112 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
115 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
118 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
121 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
124 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
127 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
130 AM_CFLAGS = -fexceptions
132 libffi_la_LDFLAGS = -release $(VERSION)
134 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
137 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
138 maintainer-clean-multi
140 all-recursive: all-multi
141 install-recursive: install-multi
142 mostlyclean-recursive: mostlyclean-multi
143 clean-recursive: clean-multi
144 distclean-recursive: distclean-multi
145 maintainer-clean-recursive: maintainer-clean-multi
148 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
150 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
152 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
154 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
156 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
157 maintainer-clean-multi:
158 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
161 ## ################################################################