Makefile.am: Add rule for .S files to fix bootstrap on solaris and alpha.
[gcc.git] / boehm-gc / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 ## FIXME: `make dist' in this directory will not currently work. Many
4 ## files that should be in the distribution are not mentioned in this
5 ## Makefile.am.
6
7 AUTOMAKE_OPTIONS = cygnus subdir-objects
8
9 SUBDIRS = include
10
11 noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la
12
13 if POWERPC_DARWIN
14 asm_libgc_sources = powerpc_darwin_mach_dep.s
15 else
16 asm_libgc_sources =
17 endif
18
19 GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
20 dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c \
21 malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
22 obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
23 solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
24 backgraph.c win32_threads.c \
25 pthread_support.c pthread_stop_world.c darwin_stop_world.c \
26 $(asm_libgc_sources)
27
28 EXTRA_DIST = alpha_mach_dep.S \
29 mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
30 rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
31 sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
32
33 libgcjgc_la_SOURCES = $(GC_SOURCES)
34 libgcjgc_convenience_la_SOURCES = $(GC_SOURCES)
35
36 # Include THREADLIBS here to ensure that the correct versions of
37 # linuxthread semaphore functions get linked:
38 libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
39 libgcjgc_la_DEPENDENCIES = @addobjs@
40 libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
41
42 libgcjgc_convenience_la_LIBADD = @addobjs@
43 libgcjgc_convenience_la_DEPENDENCIES = @addobjs@
44
45 AM_CXXFLAGS = @GC_CFLAGS@
46 AM_CFLAGS = @GC_CFLAGS@
47
48 check_PROGRAMS = gctest
49 gctest_SOURCES = tests/test.c
50 gctest_LDADD = ./libgcjgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
51 gctest_LDFLAGS = -shared-libgcc
52 TESTS_ENVIRONMENT = LD_LIBRARY_PATH=../../$(MULTIBUILDTOP)gcc
53 TESTS = gctest
54
55 ## FIXME: we shouldn't have to do this, but automake forces us to.
56 .s.lo:
57 ## We use -Wp,-P to strip #line directives. Irix `as' chokes on
58 ## these.
59 $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
60 .S.lo:
61 $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
62
63 ## We have our own definition of LTCOMPILE because we want to use our
64 ## CFLAGS, not those passed in from the top level make.
65 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) \
66 $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
67 LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
68
69 # Work around what appears to be a GNU make bug handling MAKEFLAGS
70 # values defined in terms of make variables, as is the case for CC and
71 # friends when we are called from the top level Makefile.
72 AM_MAKEFLAGS = \
73 "AR_FLAGS=$(AR_FLAGS)" \
74 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
75 "CFLAGS=$(CFLAGS)" \
76 "CXXFLAGS=$(CXXFLAGS)" \
77 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
78 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
79 "INSTALL=$(INSTALL)" \
80 "INSTALL_DATA=$(INSTALL_DATA)" \
81 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
82 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
83 "LDFLAGS=$(LDFLAGS)" \
84 "LIBCFLAGS=$(LIBCFLAGS)" \
85 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
86 "MAKE=$(MAKE)" \
87 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
88 "PICFLAG=$(PICFLAG)" \
89 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
90 "SHELL=$(SHELL)" \
91 "EXPECT=$(EXPECT)" \
92 "RUNTEST=$(RUNTEST)" \
93 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
94 "exec_prefix=$(exec_prefix)" \
95 "infodir=$(infodir)" \
96 "libdir=$(libdir)" \
97 "prefix=$(prefix)" \
98 "tooldir=$(tooldir)" \
99 "AR=$(AR)" \
100 "AS=$(AS)" \
101 "CC=$(CC)" \
102 "CXX=$(CXX)" \
103 "LD=$(LD)" \
104 "LIBCFLAGS=$(LIBCFLAGS)" \
105 "NM=$(NM)" \
106 "PICFLAG=$(PICFLAG)" \
107 "RANLIB=$(RANLIB)" \
108 "DESTDIR=$(DESTDIR)"
109
110 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
111
112 MAKEOVERRIDES=