OSDN Git Service

* include/c_std/bits/std_cmath.h: Get rid of C99 math macros.
[pf3gnuchains/gcc-fork.git] / libffi / Makefile.am
1 ## Process this with automake to create Makefile.in
2
3 AUTOMAKE_OPTIONS = cygnus
4
5 SUBDIRS = include
6
7 EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
8                 src/mips/n32.s src/mips/o32.S src/mips/o32.s \
9                 src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
10                 src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
11                 src/alpha/ffi.c src/alpha/osf.S \
12                 src/m68k/ffi.c src/m68k/sysv.S \
13                 src/powerpc/ffi.c src/powerpc/sysv.S \
14                 src/powerpc/ppc_closure.S src/powerpc/asm.h \
15                 src/arm/ffi.c src/arm/sysv.S
16
17 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
18
19 ## ################################################################
20
21 ##
22 ## This section is for make and multilib madness.
23 ##
24
25 # Work around what appears to be a GNU make bug handling MAKEFLAGS
26 # values defined in terms of make variables, as is the case for CC and
27 # friends when we are called from the top level Makefile.
28 AM_MAKEFLAGS = \
29         "AR_FLAGS=$(AR_FLAGS)" \
30         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
31         "CFLAGS=$(CFLAGS)" \
32         "CXXFLAGS=$(CXXFLAGS)" \
33         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
34         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
35         "INSTALL=$(INSTALL)" \
36         "INSTALL_DATA=$(INSTALL_DATA)" \
37         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
38         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
39         "JC1FLAGS=$(JC1FLAGS)" \
40         "LDFLAGS=$(LDFLAGS)" \
41         "LIBCFLAGS=$(LIBCFLAGS)" \
42         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
43         "MAKE=$(MAKE)" \
44         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
45         "PICFLAG=$(PICFLAG)" \
46         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
47         "SHELL=$(SHELL)" \
48         "exec_prefix=$(exec_prefix)" \
49         "infodir=$(infodir)" \
50         "libdir=$(libdir)" \
51         "prefix=$(prefix)" \
52         "AR=$(AR)" \
53         "AS=$(AS)" \
54         "CC=$(CC)" \
55         "CXX=$(CXX)" \
56         "LD=$(LD)" \
57         "LIBCFLAGS=$(LIBCFLAGS)" \
58         "NM=$(NM)" \
59         "PICFLAG=$(PICFLAG)" \
60         "RANLIB=$(RANLIB)" \
61         "DESTDIR=$(DESTDIR)"
62
63 MAKEOVERRIDES=
64
65 # Multilib support variables.
66 MULTISRCTOP =
67 MULTIBUILDTOP =
68 MULTIDIRS =
69 MULTISUBDIR =
70 MULTIDO = true
71 MULTICLEAN = true
72
73 ## Install a library built with a cross compiler in tooldir, not
74 ## libdir.
75 if USE_LIBDIR
76 toolexeclibdir = $(libdir)$(MULTISUBDIR)
77 else
78 toolexecdir = $(exec_prefix)/$(target_alias)
79 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
80 endif
81
82 toolexeclib_LTLIBRARIES = libffi.la
83
84 noinst_PROGRAMS = ffitest
85
86 ffitest_SOURCES = src/ffitest.c
87 ffitest_LDADD = libffi.la
88 ffitest_LDFLAGS = -shared-libgcc
89
90 TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
91 TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.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
99 TARGET_SRC_ARM =  src/arm/sysv.S src/arm/ffi.c
100
101 ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
102 ## Work around automake deficiency
103 libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
104                 src/raw_api.c src/java_raw_api.c
105 if MIPS_GCC
106 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
107 endif
108 if MIPS_SGI
109 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
110 endif
111 if X86
112 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
113 endif
114 if X86_WIN32
115 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
116 endif
117 if SPARC
118 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
119 endif
120 if ALPHA
121 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
122 endif
123 if IA64
124 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
125 endif
126 if M68K
127 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
128 endif
129 if POWERPC
130 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
131 endif
132 if ARM
133 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
134 endif
135
136 AM_CFLAGS = -fexceptions
137
138 libffi_la_LDFLAGS = -release $(VERSION) 
139
140 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
141
142 # Override these rules so that object files get put in the correct 
143 # subdirectories. 
144 .c.o:
145         $(LTCOMPILE) -c -o $@ $<
146
147 .s.o:
148         $(LTCOMPILE) -c -o $@ $<
149
150 .S.o:
151         $(LTCOMPILE) -c -o $@ $<
152
153 .c.lo:
154         $(LTCOMPILE) -c -o $@ $<
155
156 .s.lo:
157         $(LTCOMPILE) -c -o $@ $<
158
159 .S.lo:
160         $(LTCOMPILE) -c -o $@ $<
161
162 # Multilib support.
163 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
164         maintainer-clean-multi
165
166 all-recursive: all-multi
167 install-recursive: install-multi
168 mostlyclean-recursive: mostlyclean-multi
169 clean-recursive: clean-multi
170 distclean-recursive: distclean-multi
171 maintainer-clean-recursive: maintainer-clean-multi
172
173 all-multi:
174         $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
175 install-multi:
176         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
177 mostlyclean-multi:
178         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
179 clean-multi:
180         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
181 distclean-multi:
182         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
183 maintainer-clean-multi:
184         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
185
186
187 ## ################################################################
188