~ubuntu-branches/ubuntu/quantal/libgc/quantal

« back to all changes in this revision

Viewing changes to Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2011-02-19 12:19:56 UTC
  • mfrom: (1.3.2 upstream) (0.1.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20110219121956-67rb69xlt5nud3v2
Tags: 1:7.1-5
Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
# Original author: Tom Tromey
13
13
# Severely truncated by Hans-J. Boehm
14
14
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
 
15
# Modified by: Petter Urkedal <petter.urkedal@nordita.dk> (2005-04)
15
16
 
16
17
## Process this file with automake to produce Makefile.in.
17
18
 
18
19
## FIXME: `make distcheck' in this directory will not currently work.
19
20
##     This is most likely to the explicit flags passed to submakes.
20
21
 
21
 
AUTOMAKE_OPTIONS = foreign
22
 
 
23
 
SUBDIRS = doc include
24
 
 
 
22
# We currently use the source files directly from libatomic_ops, if we
 
23
# use the internal version.  This is done since libatomic_ops doesn't
 
24
# use libtool, since it has no real use for it.  But that seems to make
 
25
# it hard to use either the resulting object files or libraries.
 
26
# Thus there seems too be no real reason to recusively build in the
 
27
# libatomic_ops directory.
 
28
# if USE_INTERNAL_LIBATOMICS_OPS
 
29
# SUBDIRS = @maybe_libatomic_ops@
 
30
# else
 
31
# SUBDIRS =
 
32
# endif
 
33
SUBDIRS =
 
34
 
 
35
# Initialize variables so that we can declare files locally.
25
36
EXTRA_DIST = 
26
 
    ## more items will be succesively added below
27
 
 
28
 
if CPLUSPLUS
29
 
extra = libgccpp.la
30
 
else
31
 
extra = 
32
 
endif
33
 
lib_LTLIBRARIES = libgc.la $(extra) 
34
 
 
35
 
if POWERPC_DARWIN
36
 
asm_libgc_sources = powerpc_darwin_mach_dep.s
37
 
else
38
 
asm_libgc_sources = 
39
 
endif
40
 
 
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 \
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)
 
37
lib_LTLIBRARIES =
 
38
include_HEADERS =
 
39
pkginclude_HEADERS =
 
40
dist_noinst_HEADERS =
 
41
check_PROGRAMS =
 
42
TESTS =
 
43
 
 
44
pkgconfigdir = $(libdir)/pkgconfig
 
45
dist_pkgconfig_DATA = bdw-gc.pc
 
46
 
 
47
# C Library
 
48
# ---------
 
49
 
 
50
lib_LTLIBRARIES += libgc.la
 
51
libgc_la_SOURCES = \
 
52
        allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
 
53
        dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
 
54
        malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
 
55
        obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
 
56
        specific.c stubborn.c typd_mlc.c \
 
57
        backgraph.c thread_local_alloc.c
 
58
 
 
59
# C Library: Architecture Dependent
 
60
# ---------------------------------
 
61
 
 
62
if PTHREADS
 
63
libgc_la_SOURCES += pthread_support.c pthread_stop_world.c
 
64
endif
 
65
 
 
66
if DARWIN_THREADS
 
67
libgc_la_SOURCES += darwin_stop_world.c
 
68
endif
 
69
 
 
70
if WIN32_THREADS
 
71
libgc_la_SOURCES += win32_threads.c
 
72
endif
 
73
 
 
74
if USE_INTERNAL_LIBATOMIC_OPS    
 
75
nodist_libgc_la_SOURCES = ./atomic_ops.c         
 
76
endif    
 
77
         
 
78
if NEED_ATOMIC_OPS_ASM   
 
79
nodist_libgc_la_SOURCES = ./atomic_ops_sysdeps.S         
 
80
endif
49
81
 
50
82
# Include THREADDLLIBS here to ensure that the correct versions of
51
83
# linuxthread semaphore functions get linked:
52
84
libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
53
85
libgc_la_DEPENDENCIES = @addobjs@
54
 
libgc_la_LDFLAGS = -version-info 1:2:0
 
86
libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined
55
87
 
56
88
EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
57
 
    mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
 
89
    mips_sgi_mach_dep.s mips_ultrix_mach_dep.s \
58
90
    rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
59
91
    sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
60
92
 
 
93
 
 
94
# C++ Interface
 
95
# -------------
 
96
 
 
97
if CPLUSPLUS
 
98
lib_LTLIBRARIES += libgccpp.la
 
99
pkginclude_HEADERS += include/gc_cpp.h include/gc_allocator.h
61
100
libgccpp_la_SOURCES = gc_cpp.cc
62
 
libgccpp_la_LIBADD = $(THREADDLLIBS) $(UNWINDLIBS) libgc.la
63
 
libgccpp_la_LDFLAGS = -version-info 1:2:0
64
 
 
65
 
EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S
 
101
libgccpp_la_LIBADD = ./libgc.la
 
102
libgccpp_la_LDFLAGS = -version-info 1:3:0 -no-undefined
 
103
endif
 
104
 
 
105
# FIXME: If Visual C++ users use Makefile.am, this should go into
 
106
# pkginclude_HEADERS with proper AM_CONDITIONALization.  Otherwise
 
107
# delete this comment.
 
108
EXTRA_DIST += gc_cpp.cpp
 
109
 
 
110
 
 
111
# Misc
 
112
# ----
66
113
 
67
114
AM_CXXFLAGS = @GC_CFLAGS@
68
115
AM_CFLAGS = @GC_CFLAGS@
69
116
 
70
 
if CPLUSPLUS
71
 
extra_checks = test_cpp
72
 
else
73
 
extra_checks = 
74
 
endif
75
 
 
76
 
check_PROGRAMS = gctest $(extra_checks)
77
 
 
78
 
test.o: $(srcdir)/tests/test.c
79
 
        $(COMPILE) -c $(srcdir)/tests/test.c
80
 
#       Using $< in the above seems to fail with the HP/UX on Itanium make.
81
 
test_cpp.o:     $(srcdir)/tests/test_cpp.cc
82
 
        $(CXXCOMPILE) -c $(srcdir)/tests/test_cpp.cc
83
 
 
84
 
## FIXME: this is probably the reason why some files from BUILT_SOURCES
85
 
##     are included in the distribution
86
 
# gctest_OBJECTS = test.o
87
 
gctest_SOURCES = tests/test.c
88
 
gctest_LDADD = ./libgc.la $(THREADDLLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
89
 
test_cpp_SOURCES = tests/test_cpp.cc
90
 
test_cpp_LDADD = ./libgc.la ./libgccpp.la $(THREADDLLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
91
 
 
92
 
TESTS = $(check_PROGRAMS)
93
 
 
94
117
## FIXME: relies on internal code generated by automake.
95
 
all_objs = @addobjs@ $(libgc_la_OBJECTS)
96
 
$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
97
 
include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \
98
 
include/gc_pthread_redirects.h include/gc_config_macros.h \
99
 
include/gc_mark.h @addincludes@
 
118
## FIXME: ./configure --enable-dependency-tracking should be used 
 
119
#all_objs = @addobjs@ $(libgc_la_OBJECTS)
 
120
#$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
 
121
#include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \
 
122
#include/gc_pthread_redirects.h include/gc_config_macros.h \
 
123
#include/private/thread_local_alloc.h include/private_support.h \
 
124
#include/private/pthread_stop_world.h \
 
125
#include/gc_mark.h @addincludes@
100
126
 
101
127
## FIXME: we shouldn't have to do this, but automake forces us to.
 
128
## We use -Wp,-P to strip #line directives.  Irix `as' chokes on
 
129
## these.
102
130
if COMPILER_XLC
103
131
  ## XLC neither requires nor tolerates the unnecessary assembler goop
104
132
  ASM_CPP_OPTIONS =
108
136
  ASM_CPP_OPTIONS = -Wp,-P -x assembler-with-cpp
109
137
endif
110
138
.s.lo:
111
 
## We use -Wp,-P to strip #line directives.  Irix `as' chokes on
112
 
## these.
113
139
        $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
114
140
 
115
 
## We have our own definition of LTCOMPILE because we want to use our
116
 
## CFLAGS, not those passed in from the top level make.
117
 
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
118
 
        $(AM_CPPFLAGS) $(CPPFLAGS) \
119
 
        $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) 
120
 
LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
 
141
.S.lo:
 
142
        $(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
121
143
 
122
144
## We need to add DEFS to assembler flags
123
145
## :FIXME: what if assembler does not accept -D... ?
129
151
    ## callprocs --- used by Makefile.{dj,direct}
130
152
    ## configure.host --- used by Makefile.{am,dj,direct}
131
153
 
 
154
# headers which are not installed
 
155
# (see include/include.am for more)
 
156
#
 
157
 
132
158
# documentation which is not installed
133
159
#
134
160
EXTRA_DIST += README.QUICK
138
164
EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE \
139
165
    OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE \
140
166
    Makefile.direct Makefile.dj Makefile.DLLs SMakefile.amiga \
141
 
    WCC_MAKEFILE
 
167
    WCC_MAKEFILE configure_atomic_ops.sh \
 
168
    NT_STATIC_THREADS_MAKEFILE NT_X64_STATIC_THREADS_MAKEFILE \
 
169
    NT_X64_THREADS_MAKEFILE
142
170
 
143
171
# files used by makefiles other than Makefile.am
144
172
#
145
173
EXTRA_DIST += add_gc_prefix.c gcname.c if_mach.c if_not_there.c \
146
 
    hpux_test_and_clear.s pc_excludes gc.mak MacOS.c \
 
174
    hpux_test_and_clear.s gc.mak MacOS.c \
147
175
    MacProjects.sit.hqx mach_dep.c setjmp_t.c \
148
176
    threadlibs.c AmigaOS.c \
149
177
    Mac_files/datastart.c Mac_files/dataend.c \
150
 
    Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h
151
 
 
152
 
# part of C++ interface
153
 
#
154
 
EXTRA_DIST += gc_cpp.cc gc_cpp.cpp
155
 
 
156
 
# tests not used by Makefile.am (:FIXME: why?)
157
 
#
158
 
EXTRA_DIST += tests/test_cpp.cc tests/trace_test.c \
159
 
    tests/leak_test.c tests/thread_leak_test.c
160
 
 
161
 
# cord package
162
 
#
163
 
EXTRA_DIST += cord/cordbscs.c cord/cordtest.c cord/de.c cord/de_win.c \
164
 
    cord/de_win.ICO cord/cordprnt.c cord/cordxtra.c cord/de_cmds.h \
165
 
    cord/de_win.h cord/de_win.RC
 
178
    Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
 
179
    include/private/msvc_dbg.h msvc_dbg.c
 
180
 
 
181
# The libatomic_ops library.  This is not ideal, since we pick up junk from
 
182
# there.  The hard-coded version number should also go.
 
183
EXTRA_DIST += libatomic_ops-1.2
166
184
 
167
185
# this is an auxiliary shell file used by Makefile and Makefile.direct
168
186
#
177
195
# it will not remove dest if building fails
178
196
.S.s:
179
197
        if $(CPP) $< >$@ ; then :; else rm -f $@; fi
 
198
 
 
199
include include/include.am
 
200
include cord/cord.am
 
201
include tests/tests.am
 
202
include doc/doc.am
 
203
# Putting these at the top causes cord to be built first, and not find libgc.a
 
204
# on HP/UX.  There may be a better fix.
 
205
 
 
206