OSDN Git Service

2876ece464b16eb62bc1a8ba129c94925ccdafa3
[pf3gnuchains/gcc-fork.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
8
9 # Multilib support variables.
10 MULTISRCTOP =
11 MULTIBUILDTOP =
12 MULTIDIRS =
13 MULTISUBDIR =
14 MULTIDO = true
15 MULTICLEAN = true
16
17 ## Install a library built with a cross compiler in tooldir, not
18 ## libdir.
19 if USE_LIBDIR
20 toolexeclibdir = $(libdir)$(MULTISUBDIR)
21 else
22 toolexecdir = $(exec_prefix)/$(target_alias)
23 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
24 endif
25
26 toolexeclib_LTLIBRARIES = $(target_all)
27 EXTRA_LTLIBRARIES = libgcjgc.la
28 libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
29 dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \
30 linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
31 obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
32 solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
33 backgraph.c
34
35 # Include THREADLIBS here to ensure that the correct versions of
36 # linuxthread semaphore functions get linked:
37 libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
38 libgcjgc_la_DEPENDENCIES = @addobjs@
39 libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
40
41 EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s \
42 mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \
43 rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
44 sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
45
46 AM_CXXFLAGS = @GC_CFLAGS@
47 AM_CFLAGS = @GC_CFLAGS@
48
49 check_PROGRAMS = gctest
50 # The following hack produces a warning from automake, but we need it in order 
51 # to build a file from a subdirectory. FIXME.
52 test.o: tests/test.c
53         $(COMPILE) -c $(srcdir)/tests/test.c
54 #       Using $< in the above seems to fail with the HP/UX on Itanium make.
55
56 gctest_OBJECTS = test.o
57 gctest_LDADD = ./libgcjgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
58 gctest_LDFLAGS = -shared-libgcc
59 TESTS_ENVIRONMENT = LD_LIBRARY_PATH=../../$(MULTIBUILDTOP)gcc
60 TESTS = gctest
61
62 ## FIXME: relies on internal code generated by automake.
63 all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
64 $(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
65 include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
66
67 ## FIXME: we shouldn't have to do this, but automake forces us to.
68 .s.lo:
69 ## We use -Wp,-P to strip #line directives.  Irix `as' chokes on
70 ## these.
71         $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
72
73 ## We have our own definition of LTCOMPILE because we want to use our
74 ## CFLAGS, not those passed in from the top level make.
75 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
76         $(AM_CPPFLAGS) $(CPPFLAGS) \
77         $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) 
78 LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
79
80 AM_CFLAGS = @GC_CFLAGS@
81
82 # Work around what appears to be a GNU make bug handling MAKEFLAGS
83 # values defined in terms of make variables, as is the case for CC and
84 # friends when we are called from the top level Makefile.
85 AM_MAKEFLAGS = \
86         "AR_FLAGS=$(AR_FLAGS)" \
87         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
88         "CFLAGS=$(CFLAGS)" \
89         "CXXFLAGS=$(CXXFLAGS)" \
90         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
91         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
92         "INSTALL=$(INSTALL)" \
93         "INSTALL_DATA=$(INSTALL_DATA)" \
94         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
95         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
96         "LDFLAGS=$(LDFLAGS)" \
97         "LIBCFLAGS=$(LIBCFLAGS)" \
98         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
99         "MAKE=$(MAKE)" \
100         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
101         "PICFLAG=$(PICFLAG)" \
102         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
103         "SHELL=$(SHELL)" \
104         "EXPECT=$(EXPECT)" \
105         "RUNTEST=$(RUNTEST)" \
106         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
107         "exec_prefix=$(exec_prefix)" \
108         "infodir=$(infodir)" \
109         "libdir=$(libdir)" \
110         "prefix=$(prefix)" \
111         "tooldir=$(tooldir)" \
112         "AR=$(AR)" \
113         "AS=$(AS)" \
114         "CC=$(CC)" \
115         "CXX=$(CXX)" \
116         "LD=$(LD)" \
117         "LIBCFLAGS=$(LIBCFLAGS)" \
118         "NM=$(NM)" \
119         "PICFLAG=$(PICFLAG)" \
120         "RANLIB=$(RANLIB)" \
121         "DESTDIR=$(DESTDIR)"
122
123 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
124
125 # Multilib support.
126 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
127         maintainer-clean-multi
128
129 all-am: all-multi
130 install-am: install-multi
131 mostlyclean-am: mostlyclean-multi
132 clean-am: clean-multi
133 distclean-am: distclean-multi
134 maintainer-clean-am: maintainer-clean-multi
135
136 all-multi:
137         $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
138 install-multi:
139         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
140 mostlyclean-multi:
141         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
142 clean-multi:
143         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
144 distclean-multi:
145         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
146 maintainer-clean-multi:
147         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
148
149 MAKEOVERRIDES=