Add missing msvcc.sh
[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 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/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 FFI_DEBUG
99 nodist_libffi_la_SOURCES += src/debug.c
100 endif
101
102 if MIPS
103 nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
104 endif
105 if X86
106 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
107 endif
108 if X86_FREEBSD
109 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S
110 endif
111 if X86_WIN32
112 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
113 endif
114 if X86_WIN64
115 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
116 endif
117 if X86_DARWIN
118 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
119 endif
120 if SPARC
121 nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
122 endif
123 if ALPHA
124 nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
125 endif
126 if IA64
127 nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
128 endif
129 if M32R
130 nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
131 endif
132 if M68K
133 nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
134 endif
135 if POWERPC
136 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
137 endif
138 if POWERPC_AIX
139 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
140 endif
141 if POWERPC_DARWIN
142 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
143 endif
144 if POWERPC_FREEBSD
145 nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
146 endif
147 if ARM
148 nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
149 if FFI_EXEC_TRAMPOLINE_TABLE
150 nodist_libffi_la_SOURCES += src/arm/trampoline.S
151 endif
152 endif
153 if AVR32
154 nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
155 endif
156 if LIBFFI_CRIS
157 nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
158 endif
159 if FRV
160 nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
161 endif
162 if S390
163 nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
164 endif
165 if X86_64
166 nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
167 endif
168 if SH
169 nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
170 endif
171 if SH64
172 nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
173 endif
174 if PA_LINUX
175 nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
176 endif
177 if PA_HPUX
178 nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
179 endif
180
181 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
182 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
183
184 AM_CFLAGS = -g
185 if FFI_DEBUG
186 # Build debug. Define FFI_DEBUG on the commandline so that, when building with
187 # MSVC, it can link against the debug CRT.
188 AM_CFLAGS += -DFFI_DEBUG
189 endif
190
191 libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
192
193 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
194 AM_CCASFLAGS = $(AM_CPPFLAGS)
195
196 # No install-html or install-pdf support in automake yet
197 .PHONY: install-html install-pdf
198 install-html:
199 install-pdf: