1 # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
3 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
4 # OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
6 # Permission is hereby granted to use or copy this program
7 # for any purpose, provided the above notices are retained on all copies.
8 # Permission to modify the code and to distribute modified code is granted,
9 # provided the above notices are retained, and a notice that the code was
10 # modified is included with the above copyright notice.
12 # Original author: Tom Tromey
14 ## Process this file with automake to produce Makefile.in.
16 ## FIXME: `make dist' in this directory will not currently work. Many
17 ## files that should be in the distribution are not mentioned in this
20 AUTOMAKE_OPTIONS = cygnus
22 # Multilib support variables.
30 ## Install a library built with a cross compiler in tooldir, not
33 toolexeclibdir = $(libdir)$(MULTISUBDIR)
35 toolexecdir = $(exec_prefix)/$(target_alias)
36 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
39 toolexeclib_LTLIBRARIES = $(target_all)
40 EXTRA_LTLIBRARIES = libgc.la
41 libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
42 dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \
43 linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
44 obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
45 solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c
47 # Include THREADLIBS here to ensure that the correct versions of
48 # linuxthread semaphore functions get linked:
49 libgc_la_LIBADD = @addobjs@ $(THREADLIBS)
50 libgc_la_DEPENDENCIES = @addobjs@
51 libgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
53 EXTRA_libgc_la_SOURCES = alpha_mach_dep.s \
54 mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \
55 rs6000_mach_dep.s sparc_mach_dep.s sparc_netbsd_mach_dep.s \
56 sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
58 AM_CXXFLAGS = @GC_CFLAGS@
59 AM_CFLAGS = @GC_CFLAGS@
61 check_PROGRAMS = gctest
62 # The following hack produces a warning from automake, but we need it in order
63 # to build a file from a subdirectory. FIXME.
65 $(COMPILE) -c tests/test.c
66 # Using $< in the above seems to fail with the HP/UX on Itanium make.
68 gctest_OBJECTS = test.o
69 gctest_LDADD = ./libgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
70 TESTS_ENVIRONMENT = LD_LIBRARY_PATH=../../$(MULTIBUILDTOP)gcc
73 ## FIXME: relies on internal code generated by automake.
74 all_objs = @addobjs@ $(libgc_la_OBJECTS)
75 $(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
76 include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
78 ## FIXME: we shouldn't have to do this, but automake forces us to.
80 ## We use -Wp,-P to strip #line directives. Irix `as' chokes on
82 $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
84 ## We have our own definition of LTCOMPILE because we want to use our
85 ## CFLAGS, not those passed in from the top level make.
86 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
87 $(AM_CPPFLAGS) $(CPPFLAGS) \
88 $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
89 LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
91 AM_CFLAGS = @GC_CFLAGS@
93 # Work around what appears to be a GNU make bug handling MAKEFLAGS
94 # values defined in terms of make variables, as is the case for CC and
95 # friends when we are called from the top level Makefile.
97 "AR_FLAGS=$(AR_FLAGS)" \
98 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
100 "CXXFLAGS=$(CXXFLAGS)" \
101 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
102 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
103 "INSTALL=$(INSTALL)" \
104 "INSTALL_DATA=$(INSTALL_DATA)" \
105 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
106 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
107 "LDFLAGS=$(LDFLAGS)" \
108 "LIBCFLAGS=$(LIBCFLAGS)" \
109 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
111 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
112 "PICFLAG=$(PICFLAG)" \
113 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
116 "RUNTEST=$(RUNTEST)" \
117 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
118 "exec_prefix=$(exec_prefix)" \
119 "infodir=$(infodir)" \
122 "tooldir=$(tooldir)" \
128 "LIBCFLAGS=$(LIBCFLAGS)" \
130 "PICFLAG=$(PICFLAG)" \
134 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
137 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
138 maintainer-clean-multi
141 install-am: install-multi
142 mostlyclean-am: mostlyclean-multi
143 clean-am: clean-multi
144 distclean-am: distclean-multi
145 maintainer-clean-am: maintainer-clean-multi
148 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
150 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
152 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
154 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
156 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
157 maintainer-clean-multi:
158 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean