Home | History | Annotate | Download | only in libffi
      1 ## Process this with automake to create Makefile.in
      2 
      3 AUTOMAKE_OPTIONS = foreign subdir-objects
      4 
      5 ACLOCAL_AMFLAGS = -I m4
      6 
      7 SUBDIRS = include testsuite man
      8 
      9 EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj			\
     10 	 src/aarch64/ffi.c src/aarch64/ffitarget.h src/aarch64/sysv.S	\
     11 	 src/alpha/ffi.c src/alpha/osf.S			\
     12 	 src/alpha/ffitarget.h src/arc/ffi.c src/arc/arcompact.S	\
     13 	 src/arc/ffitarget.h src/arm/ffi.c src/arm/sysv.S		\
     14 	 src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S		\
     15 	 src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S		\
     16 	 src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h	\
     17 	 src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c		\
     18 	 src/mips/n32.S src/mips/o32.S src/metag/ffi.c			\
     19 	 src/metag/ffitarget.h src/metag/sysv.S src/moxie/ffi.c		\
     20 	 src/moxie/ffitarget.h src/moxie/eabi.S src/mips/ffitarget.h	\
     21 	 src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h		\
     22 	 src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h		\
     23 	 src/m88k/ffi.c src/m88k/obsd.S src/m88k/ffitarget.h		\
     24 	 src/microblaze/ffi.c src/microblaze/sysv.S			\
     25 	 src/microblaze/ffitarget.h					\
     26 	 src/nios2/ffi.c src/nios2/ffitarget.h src/nios2/sysv.S		\
     27 	 src/powerpc/ffi.c src/powerpc/ffi_powerpc.h			\
     28 	 src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c		\
     29 	 src/powerpc/sysv.S src/powerpc/linux64.S			\
     30 	 src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S	\
     31 	 src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S	\
     32 	 src/powerpc/aix_closure.S src/powerpc/darwin_closure.S		\
     33 	 src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h		\
     34 	 src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h		\
     35 	 src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c	\
     36 	 src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S		\
     37 	 src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c		\
     38 	 src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S		\
     39 	 src/x86/win32.S src/x86/darwin.S src/x86/win64.S		\
     40 	 src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S		\
     41 	 src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c		\
     42 	 src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/bfin/ffi.c	\
     43 	 src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S		\
     44 	 src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c		\
     45 	 src/tile/ffitarget.h src/tile/tile.S libtool-version		\
     46 	 src/vax/ffi.c src/vax/ffitarget.h src/vax/elfbsd.S		\
     47 	 src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S	\
     48 	 ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4		\
     49 	 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4			\
     50 	 m4/ltversion.m4 src/arm/gentramp.sh src/debug.c msvcc.sh	\
     51 	 generate-darwin-source-and-headers.py				\
     52 	 libffi.xcodeproj/project.pbxproj src/arm/trampoline.S		\
     53 	 libtool-ldflags ChangeLog.libffi-3.1
     54 
     55 info_TEXINFOS = doc/libffi.texi
     56 
     57 ## ################################################################
     58 
     59 ##
     60 ## This section is for make and multilib madness.
     61 ##
     62 
     63 # Work around what appears to be a GNU make bug handling MAKEFLAGS
     64 # values defined in terms of make variables, as is the case for CC and
     65 # friends when we are called from the top level Makefile.
     66 AM_MAKEFLAGS = \
     67 	'AR_FLAGS=$(AR_FLAGS)' \
     68 	'CC_FOR_BUILD=$(CC_FOR_BUILD)' \
     69 	'CFLAGS=$(CFLAGS)' \
     70 	'CXXFLAGS=$(CXXFLAGS)' \
     71 	'CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)' \
     72 	'CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)' \
     73 	'INSTALL=$(INSTALL)' \
     74 	'INSTALL_DATA=$(INSTALL_DATA)' \
     75 	'INSTALL_PROGRAM=$(INSTALL_PROGRAM)' \
     76 	'INSTALL_SCRIPT=$(INSTALL_SCRIPT)' \
     77 	'JC1FLAGS=$(JC1FLAGS)' \
     78 	'LDFLAGS=$(LDFLAGS)' \
     79 	'LIBCFLAGS=$(LIBCFLAGS)' \
     80 	'LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)' \
     81 	'MAKE=$(MAKE)' \
     82 	'MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)' \
     83 	'PICFLAG=$(PICFLAG)' \
     84 	'PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)' \
     85 	'RUNTESTFLAGS=$(RUNTESTFLAGS)' \
     86 	'SHELL=$(SHELL)' \
     87 	'exec_prefix=$(exec_prefix)' \
     88 	'infodir=$(infodir)' \
     89 	'libdir=$(libdir)' \
     90 	'mandir=$(mandir)' \
     91 	'prefix=$(prefix)' \
     92 	'AR=$(AR)' \
     93 	'AS=$(AS)' \
     94 	'CC=$(CC)' \
     95 	'CXX=$(CXX)' \
     96 	'LD=$(LD)' \
     97 	'NM=$(NM)' \
     98 	'RANLIB=$(RANLIB)' \
     99 	'DESTDIR=$(DESTDIR)'
    100 
    101 # Subdir rules rely on $(FLAGS_TO_PASS)
    102 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
    103 
    104 MAKEOVERRIDES=
    105 
    106 toolexeclib_LTLIBRARIES = libffi.la
    107 noinst_LTLIBRARIES = libffi_convenience.la
    108 
    109 libffi_la_SOURCES = src/prep_cif.c src/types.c \
    110 		src/raw_api.c src/java_raw_api.c src/closures.c
    111 
    112 pkgconfigdir = $(libdir)/pkgconfig
    113 pkgconfig_DATA = libffi.pc
    114 
    115 nodist_libffi_la_SOURCES =
    116 
    117 if FFI_DEBUG
    118 nodist_libffi_la_SOURCES += src/debug.c
    119 endif
    120 
    121 if MIPS
    122 nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
    123 endif
    124 if BFIN
    125 nodist_libffi_la_SOURCES += src/bfin/ffi.c src/bfin/sysv.S
    126 endif
    127 if X86
    128 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S src/x86/win32.S
    129 endif
    130 if X86_FREEBSD
    131 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S src/x86/win32.S
    132 endif
    133 if X86_WIN32
    134 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
    135 endif
    136 if X86_WIN64
    137 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
    138 endif
    139 if X86_DARWIN
    140 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
    141 if X86_DARWIN32
    142 nodist_libffi_la_SOURCES += src/x86/win32.S
    143 endif
    144 endif
    145 if SPARC
    146 nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
    147 endif
    148 if ALPHA
    149 nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
    150 endif
    151 if IA64
    152 nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
    153 endif
    154 if M32R
    155 nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
    156 endif
    157 if M68K
    158 nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
    159 endif
    160 if M88K
    161 nodist_libffi_la_SOURCES += src/m88k/ffi.c src/m88k/obsd.S
    162 endif
    163 if MOXIE
    164 nodist_libffi_la_SOURCES += src/moxie/ffi.c src/moxie/eabi.S
    165 endif
    166 if MICROBLAZE
    167 nodist_libffi_la_SOURCES += src/microblaze/ffi.c src/microblaze/sysv.S
    168 endif
    169 if NIOS2
    170 nodist_libffi_la_SOURCES += src/nios2/sysv.S src/nios2/ffi.c
    171 endif
    172 if POWERPC
    173 nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
    174 endif
    175 if POWERPC_AIX
    176 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
    177 endif
    178 if POWERPC_DARWIN
    179 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
    180 endif
    181 if POWERPC_FREEBSD
    182 nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
    183 endif
    184 if AARCH64
    185 nodist_libffi_la_SOURCES += src/aarch64/sysv.S src/aarch64/ffi.c
    186 endif
    187 if ARC
    188 nodist_libffi_la_SOURCES += src/arc/arcompact.S src/arc/ffi.c
    189 endif
    190 if ARM
    191 nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
    192 if FFI_EXEC_TRAMPOLINE_TABLE
    193 nodist_libffi_la_SOURCES += src/arm/trampoline.S
    194 endif
    195 endif
    196 if AVR32
    197 nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
    198 endif
    199 if LIBFFI_CRIS
    200 nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
    201 endif
    202 if FRV
    203 nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
    204 endif
    205 if S390
    206 nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
    207 endif
    208 if X86_64
    209 nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
    210 endif
    211 if SH
    212 nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
    213 endif
    214 if SH64
    215 nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
    216 endif
    217 if PA_LINUX
    218 nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
    219 endif
    220 if PA_HPUX
    221 nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
    222 endif
    223 if TILE
    224 nodist_libffi_la_SOURCES += src/tile/tile.S src/tile/ffi.c
    225 endif
    226 if XTENSA
    227 nodist_libffi_la_SOURCES += src/xtensa/sysv.S src/xtensa/ffi.c
    228 endif
    229 if METAG
    230 nodist_libffi_la_SOURCES += src/metag/sysv.S src/metag/ffi.c
    231 endif
    232 if VAX
    233 nodist_libffi_la_SOURCES += src/vax/elfbsd.S src/vax/ffi.c
    234 endif
    235 
    236 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
    237 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
    238 
    239 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS))
    240 
    241 AM_CFLAGS =
    242 if FFI_DEBUG
    243 # Build debug. Define FFI_DEBUG on the commandline so that, when building with
    244 # MSVC, it can link against the debug CRT.
    245 AM_CFLAGS += -DFFI_DEBUG
    246 endif
    247 
    248 libffi_la_LDFLAGS = -no-undefined -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
    249 
    250 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
    251 AM_CCASFLAGS = $(AM_CPPFLAGS)
    252 
    253 dist-hook:
    254 	if [ -d $(top_srcdir)/.git ] ; then (cd $(top_srcdir); git log --no-decorate) ; else echo 'See git log for history.' ; fi > $(distdir)/ChangeLog
    255