OSDN Git Service

* Makefile.in (local-distclean): Also remove fastjar.
[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 \
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 src/powerpc/asm.h \
14                 src/arm/ffi.c src/arm/sysv.S
15
16 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
17
18 ## ################################################################
19
20 ##
21 ## This section is for make and multilib madness.
22 ##
23
24 # Work around what appears to be a GNU make bug handling MAKEFLAGS
25 # values defined in terms of make variables, as is the case for CC and
26 # friends when we are called from the top level Makefile.
27 AM_MAKEFLAGS = \
28         "AR_FLAGS=$(AR_FLAGS)" \
29         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
30         "CFLAGS=$(CFLAGS)" \
31         "CXXFLAGS=$(CXXFLAGS)" \
32         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
33         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
34         "INSTALL=$(INSTALL)" \
35         "INSTALL_DATA=$(INSTALL_DATA)" \
36         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
37         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
38         "JC1FLAGS=$(JC1FLAGS)" \
39         "LDFLAGS=$(LDFLAGS)" \
40         "LIBCFLAGS=$(LIBCFLAGS)" \
41         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
42         "MAKE=$(MAKE)" \
43         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
44         "PICFLAG=$(PICFLAG)" \
45         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
46         "SHELL=$(SHELL)" \
47         "exec_prefix=$(exec_prefix)" \
48         "infodir=$(infodir)" \
49         "libdir=$(libdir)" \
50         "prefix=$(prefix)" \
51         "AR=$(AR)" \
52         "AS=$(AS)" \
53         "CC=$(CC)" \
54         "CXX=$(CXX)" \
55         "LD=$(LD)" \
56         "LIBCFLAGS=$(LIBCFLAGS)" \
57         "NM=$(NM)" \
58         "PICFLAG=$(PICFLAG)" \
59         "RANLIB=$(RANLIB)" \
60         "DESTDIR=$(DESTDIR)"
61
62 MAKEOVERRIDES=
63
64 # Multilib support variables.
65 MULTISRCTOP =
66 MULTIBUILDTOP =
67 MULTIDIRS =
68 MULTISUBDIR =
69 MULTIDO = true
70 MULTICLEAN = true
71
72 ## Install a library built with a cross compiler in tooldir, not
73 ## libdir.
74 if USE_LIBDIR
75 toolexeclibdir = $(libdir)$(MULTISUBDIR)
76 else
77 toolexecdir = $(exec_prefix)/$(target_alias)
78 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
79 endif
80
81 toolexeclib_LTLIBRARIES = libffi.la
82
83 noinst_PROGRAMS = ffitest
84
85 ffitest_SOURCES = src/ffitest.c
86 ffitest_LDADD = libffi.la
87
88 TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
89 TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
90 TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
91 TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
92 TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
93 TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
94 TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
95 TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S
96 TARGET_SRC_ARM =  src/arm/sysv.S src/arm/ffi.c
97
98 ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
99 ## Work around automake deficiency
100 libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
101                 src/raw_api.c src/java_raw_api.c
102 if MIPS_GCC
103 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
104 endif
105 if MIPS_SGI
106 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
107 endif
108 if X86
109 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
110 endif
111 if SPARC
112 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
113 endif
114 if ALPHA
115 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
116 endif
117 if IA64
118 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
119 endif
120 if M68K
121 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
122 endif
123 if POWERPC
124 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
125 endif
126 if ARM
127 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
128 endif
129
130 AM_CFLAGS = -fexceptions
131
132 libffi_la_LDFLAGS = -release $(VERSION) 
133
134 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
135
136 # Multilib support.
137 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
138         maintainer-clean-multi
139
140 all-recursive: all-multi
141 install-recursive: install-multi
142 mostlyclean-recursive: mostlyclean-multi
143 clean-recursive: clean-multi
144 distclean-recursive: distclean-multi
145 maintainer-clean-recursive: maintainer-clean-multi
146
147 all-multi:
148         $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
149 install-multi:
150         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
151 mostlyclean-multi:
152         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
153 clean-multi:
154         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
155 distclean-multi:
156         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
157 maintainer-clean-multi:
158         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
159
160
161 ## ################################################################
162