michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: SOURCES += [ michael@0: 'src/src/arena.c', michael@0: 'src/src/atomic.c', michael@0: 'src/src/base.c', michael@0: 'src/src/bitmap.c', michael@0: 'src/src/chunk.c', michael@0: 'src/src/chunk_dss.c', michael@0: 'src/src/chunk_mmap.c', michael@0: 'src/src/ckh.c', michael@0: 'src/src/ctl.c', michael@0: 'src/src/extent.c', michael@0: 'src/src/hash.c', michael@0: 'src/src/huge.c', michael@0: 'src/src/jemalloc.c', michael@0: 'src/src/mb.c', michael@0: 'src/src/mutex.c', michael@0: 'src/src/prof.c', michael@0: 'src/src/quarantine.c', michael@0: 'src/src/rtree.c', michael@0: 'src/src/stats.c', michael@0: 'src/src/tcache.c', michael@0: 'src/src/tsd.c', michael@0: 'src/src/util.c', michael@0: ] michael@0: michael@0: # Only OSX needs the zone allocation implementation, michael@0: # but only if replace-malloc is not enabled. michael@0: if CONFIG['OS_TARGET'] == 'Darwin' and not CONFIG['MOZ_REPLACE_MALLOC']: michael@0: SOURCES += [ michael@0: 'src/src/zone.c', michael@0: ] michael@0: michael@0: LIBRARY_NAME = 'jemalloc' michael@0: michael@0: FORCE_STATIC_LIB = True michael@0: michael@0: if CONFIG['_MSC_VER']: michael@0: DEFINES['DLLEXPORT'] = True michael@0: LOCAL_INCLUDES += ['src/include/msvc_compat'] michael@0: michael@0: if CONFIG['OS_TARGET'] == 'Linux': michael@0: # For mremap michael@0: DEFINES['_GNU_SOURCE'] = True michael@0: michael@0: DEFINES['abort'] = 'moz_abort' michael@0: michael@0: GENERATED_INCLUDES += ['src/include'] michael@0: LOCAL_INCLUDES += ['src/include']