* calls.c (initialize_argument_information): Add CALL_FROM_THUNK_P
[official-gcc.git] / libffi / Makefile.am
blobb599865e91512536fd5d7ee423ca526bf60f6a37
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 \
23         src/sparc/ffi.c \
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.
39 AM_MAKEFLAGS = \
40         "AR_FLAGS=$(AR_FLAGS)" \
41         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
42         "CFLAGS=$(CFLAGS)" \
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)" \
54         "MAKE=$(MAKE)" \
55         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
56         "PICFLAG=$(PICFLAG)" \
57         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
58         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
59         "SHELL=$(SHELL)" \
60         "exec_prefix=$(exec_prefix)" \
61         "infodir=$(infodir)" \
62         "libdir=$(libdir)" \
63         "prefix=$(prefix)" \
64         "AR=$(AR)" \
65         "AS=$(AS)" \
66         "CC=$(CC)" \
67         "CXX=$(CXX)" \
68         "LD=$(LD)" \
69         "LIBCFLAGS=$(LIBCFLAGS)" \
70         "NM=$(NM)" \
71         "PICFLAG=$(PICFLAG)" \
72         "RANLIB=$(RANLIB)" \
73         "DESTDIR=$(DESTDIR)"
75 MAKEOVERRIDES=
77 # Multilib support variables.
78 MULTISRCTOP =
79 MULTIBUILDTOP =
80 MULTIDIRS =
81 MULTISUBDIR =
82 MULTIDO = true
83 MULTICLEAN = true
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
111 if MIPS_IRIX
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)
114 endif
115 if MIPS_LINUX
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)
118 endif
119 if X86
120 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
121 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
122 endif
123 if X86_WIN32
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)
126 endif
127 if SPARC
128 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
129 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
130 endif
131 if ALPHA
132 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
133 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
134 endif
135 if IA64
136 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
137 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
138 endif
139 if M68K
140 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
141 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
142 endif
143 if POWERPC
144 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
145 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
146 endif
147 if POWERPC_AIX
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)
150 endif
151 if POWERPC_DARWIN
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)
154 endif
155 if ARM
156 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
157 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
158 endif
159 if S390
160 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
161 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
162 endif
163 if X86_64
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)
166 endif
167 if SH
168 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
169 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
170 endif
171 if SH64
172 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH64)
173 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH64)
174 endif
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 
183 # subdirectories. 
184 .c.o:
185         $(LTCOMPILE) -c -o $@ $<
187 .s.o:
188         $(LTCOMPILE) -c -o $@ $<
190 .S.o:
191         $(LTCOMPILE) -c -o $@ $<
193 .c.lo:
194         $(LTCOMPILE) -c -o $@ $<
196 .s.lo:
197         $(LTCOMPILE) -c -o $@ $<
199 .S.lo:
200         $(LTCOMPILE) -c -o $@ $<
202 # Multilib support.
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
213 all-multi:
214         : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
215 install-multi:
216         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
217 mostlyclean-multi:
218         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
219 clean-multi:
220         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
221 distclean-multi:
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
231 mostlyclean-sub:
232         -rm -f src/*.o src/*.lo
233         -rm -f src/@TARGETDIR@/*.o src/@TARGETDIR@/*.lo
235 clean-am: clean-sub
236 clean-sub:
237         -rm -rf src/.libs src/_libs
238         -rm -rf src/@TARGETDIR@/.libs src/@TARGETDIR@/_libs