2005-01-15 Ben Maurer <bmaurer@ximian.com>
[mono.git] / libgc / Makefile.am
1 # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
2
3 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
4 # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
5
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.
11 #
12 # Original author: Tom Tromey
13 # Severely truncated by Hans-J. Boehm
14
15 ## Process this file with automake to produce Makefile.in.
16
17 ## FIXME: `make dist' in this directory will not currently work.  Many
18 ## files that should be in the distribution are not mentioned in this
19 ## Makefile.am.
20
21 AUTOMAKE_OPTIONS = foreign
22
23 SUBDIRS = include doc
24
25 #
26 # libtool is not capable of creating shared/static versions of a convenience
27 # library, so we have to do it ourselves
28 #
29
30 noinst_LTLIBRARIES = libmonogc.la libmonogc-static.la
31
32 EXTRA_DIST = 
33     ## more items will be succesively added below
34
35 if POWERPC_DARWIN
36 asm_libgc_sources = powerpc_darwin_mach_dep.s
37 else
38 asm_libgc_sources = 
39 endif
40
41 libmonogc_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 aix_irix_threads.c \
43 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 \
46 backgraph.c win32_threads.c \
47 pthread_support.c pthread_stop_world.c darwin_stop_world.c \
48 $(asm_libgc_sources)
49
50
51 # Include THREADLIBS here to ensure that the correct versions of
52 # linuxthread semaphore functions get linked:
53 libmonogc_la_LIBADD = @addobjs@ $(THREADLIBS) $(UNWINDLIBS)
54 libmonogc_la_DEPENDENCIES = @addobjs@
55 libmonogc_la_LDFLAGS = -version-info 1:2:0
56
57 EXTRA_libmonogc_la_SOURCES = alpha_mach_dep.S \
58     mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
59     rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
60     sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
61
62 libmonogc_static_la_SOURCES = $(libmonogc_la_SOURCES)
63 libmonogc_static_la_LIBADD = $(libmonogc_la_LIBADD)
64 libmonogc_static_la_LDFLAGS = -static
65
66 EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S
67
68 AM_CFLAGS = @GC_CFLAGS@
69
70 ## FIXME: relies on internal code generated by automake.
71 all_objs = @addobjs@ $(libgc_la_OBJECTS)
72 $(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
73 include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
74
75 ## FIXME: we shouldn't have to do this, but automake forces us to.
76 .s.lo:
77 ## We use -Wp,-P to strip #line directives.  Irix `as' chokes on
78 ## these.
79         $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
80
81 ## We have our own definition of LTCOMPILE because we want to use our
82 ## CFLAGS, not those passed in from the top level make.
83 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
84         -I$(top_srcdir)/include $(AM_CPPFLAGS) $(CPPFLAGS) \
85         $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) 
86 LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
87
88 # Work around what appears to be a GNU make bug handling MAKEFLAGS
89 # values defined in terms of make variables, as is the case for CC and
90 # friends when we are called from the top level Makefile.
91 AM_MAKEFLAGS = \
92         "AR_FLAGS=$(AR_FLAGS)" \
93         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
94         "CFLAGS=$(CFLAGS)" \
95         "CXXFLAGS=$(CXXFLAGS)" \
96         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
97         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
98         "INSTALL=$(INSTALL)" \
99         "INSTALL_DATA=$(INSTALL_DATA)" \
100         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
101         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
102         "LDFLAGS=$(LDFLAGS)" \
103         "LIBCFLAGS=$(LIBCFLAGS)" \
104         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
105         "MAKE=$(MAKE)" \
106         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
107         "PICFLAG=$(PICFLAG)" \
108         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
109         "SHELL=$(SHELL)" \
110         "EXPECT=$(EXPECT)" \
111         "RUNTEST=$(RUNTEST)" \
112         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
113         "exec_prefix=$(exec_prefix)" \
114         "infodir=$(infodir)" \
115         "libdir=$(libdir)" \
116         "prefix=$(prefix)" \
117         "tooldir=$(tooldir)" \
118         "AR=$(AR)" \
119         "AS=$(AS)" \
120         "CC=$(CC)" \
121         "CXX=$(CXX)" \
122         "LD=$(LD)" \
123         "LIBCFLAGS=$(LIBCFLAGS)" \
124         "NM=$(NM)" \
125         "PICFLAG=$(PICFLAG)" \
126         "RANLIB=$(RANLIB)" \
127         "DESTDIR=$(DESTDIR)"
128
129 MAKEOVERRIDES=
130
131 # files used by makefiles other than Makefile.am
132 #
133 EXTRA_DIST += add_gc_prefix.c gcname.c if_mach.c if_not_there.c hpux_test_and_clear.s pc_excludes gc.mak MacOS.c MacProjects.sit.hqx mach_dep.c setjmp_t.c threadlibs.c AmigaOS.c version.h Mac_files/datastart.c Mac_files/dataend.c Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h
134
135 # cord package
136 #
137 EXTRA_DIST += cord/cordbscs.c cord/cordtest.c cord/de.c cord/de_win.c cord/de_win.ICO cord/cordprnt.c cord/cordxtra.c cord/de_cmds.h cord/de_win.h cord/de_win.RC
138
139 # this is an auxiliary shell file used by Makefile and Makefile.direct
140 #
141 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
142
143 # :FIXME: why do we distribute this one???
144 #
145 EXTRA_DIST += libtool.m4 configure.host
146
147 #
148 # :GOTCHA: GNU make rule for making .s out of .S is flawed, 
149 # it will not remove dest if building fails
150 .S.s:
151         if $(CPP) $< >$@ ; then :; else rm -f $@; fi