Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/bdwgc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am40
1 files changed, 26 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index 7b851e29..649ede4d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,9 +25,12 @@ SUBDIRS = doc include
EXTRA_DIST =
## more items will be succesively added below
-lib_LTLIBRARIES = libgc.la @addlibs@
-
-EXTRA_LTLIBRARIES = libgccpp.la
+if CPLUSPLUS
+extra = libgccpp.la
+else
+extra =
+endif
+lib_LTLIBRARIES = libgc.la $(extra)
include_HEADERS = include/gc.h include/gc_local_alloc.h \
include/gc_pthread_redirects.h include/gc_config_macros.h \
@@ -35,12 +38,20 @@ include/leak_detector.h include/gc_typed.h @addincludes@
EXTRA_HEADERS = include/gc_cpp.h include/gc_allocator.h
+if POWERPC_DARWIN
+asm_libgc_sources = powerpc_darwin_mach_dep.s
+else
+asm_libgc_sources =
+endif
+
libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
-dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \
-linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
+dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c \
+malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
-backgraph.c win32_threads.c
+backgraph.c win32_threads.c \
+pthread_support.c pthread_stop_world.c darwin_stop_world.c \
+$(asm_libgc_sources)
# Include THREADLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked:
@@ -49,7 +60,7 @@ libgc_la_DEPENDENCIES = @addobjs@
libgc_la_LDFLAGS = -version-info 1:2:0
EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
- mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \
+ mips_sgi_mach_dep.S mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
@@ -62,8 +73,13 @@ EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.S sparc_mach_dep.S
AM_CXXFLAGS = @GC_CFLAGS@
AM_CFLAGS = @GC_CFLAGS@
-check_PROGRAMS = gctest @addtests@
-EXTRA_PROGRAMS = test_cpp
+if CPLUSPLUS
+extra_checks = test_cpp
+else
+extra_checks =
+endif
+
+check_PROGRAMS = gctest $(extra_checks)
test.o: $(srcdir)/tests/test.c
$(COMPILE) -c $(srcdir)/tests/test.c
@@ -79,11 +95,7 @@ gctest_LDADD = ./libgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
test_cpp_SOURCES = tests/test_cpp.cc
test_cpp_LDADD = ./libgc.la ./libgccpp.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
-TESTS = gctest @addtests@
-
-test_cpp$(EXEEXT): test_cpp.o
- $(LIBTOOL) --mode=link $(CXX) $(AM_CFLAGS) $(MY_CFLAGS) \
- test_cpp.o $(test_cpp_LDADD) $(LDFLAGS) -o $@
+TESTS = gctest $(extra_checks)
## FIXME: relies on internal code generated by automake.
all_objs = @addobjs@ $(libgc_la_OBJECTS)