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