Revert remove-debug-code patch temporarily (for ARM Fedora release)
[libffi.git] / Makefile.am
1 ## Process this with automake to create Makefile.in
2
3 AUTOMAKE_OPTIONS = foreign subdir-objects
4
5 SUBDIRS = include testsuite man
6
7 EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host       \
8         src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h           \
9         src/arm/ffi.c src/arm/sysv.S src/arm/trampoline.S               \
10         src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S            \
11         src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S            \
12         src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h        \
13         src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c            \
14         src/mips/n32.S src/mips/o32.S src/mips/ffitarget.h              \
15         src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h             \
16         src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h             \
17         src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/linux64.S      \
18         src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S         \
19         src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S        \
20         src/powerpc/aix_closure.S src/powerpc/darwin_closure.S          \
21         src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h                \
22         src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h             \
23         src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c    \
24         src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S             \
25         src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c            \
26         src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S                 \
27         src/x86/win32.S src/x86/win64.S src/x86/darwin.S                \
28         src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S              \
29         src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c             \
30         src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/frv/eabi.S     \
31         src/frv/ffitarget.h src/dlmalloc.c src/moxie/ffi.c              \
32         src/moxie/eabi.S libtool-version ChangeLog.libffi               \
33         m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4   \
34         m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh src/debug.c    \
35         msvcc.sh
36
37
38 info_TEXINFOS = doc/libffi.texi
39
40 ## ################################################################
41
42 ##
43 ## This section is for make and multilib madness.
44 ##
45
46 # Work around what appears to be a GNU make bug handling MAKEFLAGS
47 # values defined in terms of make variables, as is the case for CC and
48 # friends when we are called from the top level Makefile.
49 AM_MAKEFLAGS = \
50         "AR_FLAGS=$(AR_FLAGS)" \
51         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
52         "CFLAGS=$(CFLAGS)" \
53         "CXXFLAGS=$(CXXFLAGS)" \
54         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
55         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
56         "INSTALL=$(INSTALL)" \
57         "INSTALL_DATA=$(INSTALL_DATA)" \
58         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
59         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
60         "JC1FLAGS=$(JC1FLAGS)" \
61         "LDFLAGS=$(LDFLAGS)" \
62         "LIBCFLAGS=$(LIBCFLAGS)" \
63         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
64         "MAKE=$(MAKE)" \
65         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
66         "PICFLAG=$(PICFLAG)" \
67         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
68         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
69         "SHELL=$(SHELL)" \
70         "exec_prefix=$(exec_prefix)" \
71         "infodir=$(infodir)" \
72         "libdir=$(libdir)" \
73         "mandir=$(mandir)" \
74         "prefix=$(prefix)" \
75         "AR=$(AR)" \
76         "AS=$(AS)" \
77         "CC=$(CC)" \
78         "CXX=$(CXX)" \
79         "LD=$(LD)" \
80         "NM=$(NM)" \
81         "RANLIB=$(RANLIB)" \
82         "DESTDIR=$(DESTDIR)"
83
84 MAKEOVERRIDES=
85
86 ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
87
88 lib_LTLIBRARIES = libffi.la
89 noinst_LTLIBRARIES = libffi_convenience.la
90
91 libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
92                 src/raw_api.c src/java_raw_api.c src/closures.c
93
94 pkgconfigdir = $(libdir)/pkgconfig
95 pkgconfig_DATA = libffi.pc
96
97 nodist_libffi_la_SOURCES =
98
99 if MIPS
100 nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
101 endif
102 if X86
103 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
104 endif
105 if X86_FREEBSD
106 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S
107 endif
108 if X86_WIN32
109 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
110 endif
111 if X86_WIN64
112 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
113 endif
114 if X86_DARWIN
115 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
116 endif
117 if SPARC
118 nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
119 endif
120 if ALPHA
121 nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
122 endif
123 if IA64
124 nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
125 endif
126 if M32R
127 nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
128 endif
129 if M68K
130 nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
131 endif
132 if POWERPC
133 nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
134 endif
135 if POWERPC_AIX
136 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
137 endif
138 if POWERPC_DARWIN
139 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
140 endif
141 if POWERPC_FREEBSD
142 nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
143 endif
144 if ARM
145 nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
146 if FFI_EXEC_TRAMPOLINE_TABLE
147 nodist_libffi_la_SOURCES += src/arm/trampoline.S
148 endif
149 endif
150 if AVR32
151 nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
152 endif
153 if LIBFFI_CRIS
154 nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
155 endif
156 if FRV
157 nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
158 endif
159 if S390
160 nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
161 endif
162 if X86_64
163 nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
164 endif
165 if SH
166 nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
167 endif
168 if SH64
169 nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
170 endif
171 if PA_LINUX
172 nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
173 endif
174 if PA_HPUX
175 nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
176 endif
177
178 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
179 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
180
181 AM_CFLAGS = -g
182 if FFI_DEBUG
183 # Build debug. Define FFI_DEBUG on the commandline so that, when building with
184 # MSVC, it can link against the debug CRT.
185 AM_CFLAGS += -DFFI_DEBUG
186 endif
187
188 libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
189
190 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
191 AM_CCASFLAGS = $(AM_CPPFLAGS)
192
193 # No install-html or install-pdf support in automake yet
194 .PHONY: install-html install-pdf
195 install-html:
196 install-pdf: