build: use subdir meson.build files

This keeps the build file closer to the sources it effects.
This commit is contained in:
Christian Hergert
2017-09-28 16:57:00 -07:00
parent 4f93ede6fa
commit 190faa818d
9 changed files with 168 additions and 110 deletions

17
lib/callgraph/meson.build Normal file
View File

@ -0,0 +1,17 @@
libsysprof_headers += files([
'sp-callgraph-profile.h',
])
libsysprof_sources += files([
'sp-callgraph-profile-private.h',
'sp-callgraph-profile.c',
])
libsysprof_ui_headers += files([
'sp-callgraph-view.h',
])
libsysprof_ui_sources += files([
'sp-callgraph-view.c',
])

14
lib/capture/meson.build Normal file
View File

@ -0,0 +1,14 @@
libsysprof_headers += files([
'sp-capture-condition.h',
'sp-capture-cursor.h',
'sp-capture-reader.h',
'sp-capture-types.h',
'sp-capture-writer.h',
])
libsysprof_sources += files([
'sp-capture-condition.c',
'sp-capture-cursor.c',
'sp-capture-reader.c',
'sp-capture-writer.c',
])

View File

@ -26,72 +26,26 @@ libsysprof_headers = [
'sp-address.h',
'sp-clock.h',
'sp-error.h',
'callgraph/sp-callgraph-profile.h',
'capture/sp-capture-condition.h',
'capture/sp-capture-cursor.h',
'capture/sp-capture-reader.h',
'capture/sp-capture-types.h',
'capture/sp-capture-writer.h',
'profiler/sp-local-profiler.h',
'profiler/sp-profile.h',
'profiler/sp-profiler.h',
'sources/sp-gjs-source.h',
'sources/sp-hostinfo-source.h',
'sources/sp-perf-source.h',
'sources/sp-proc-source.h',
'sources/sp-source.h',
'symbols/sp-elf-symbol-resolver.h',
'symbols/sp-jitmap-symbol-resolver.h',
'symbols/sp-kernel-symbol-resolver.h',
'symbols/sp-kernel-symbol.h',
'symbols/sp-symbol-dirs.h',
'symbols/sp-symbol-resolver.h',
'util/sp-map-lookaside.h',
'util/sp-selection.h',
]
libsysprof_sources = [
'sp-address.c',
'sp-clock.c',
'sp-error.c',
'callgraph/sp-callgraph-profile-private.h',
'callgraph/sp-callgraph-profile.c',
'capture/sp-capture-condition.c',
'capture/sp-capture-cursor.c',
'capture/sp-capture-reader.c',
'capture/sp-capture-writer.c',
'profiler/sp-local-profiler.c',
'profiler/sp-profile.c',
'profiler/sp-profiler.c',
'sources/sp-gjs-source.c',
'sources/sp-hostinfo-source.c',
'sources/sp-perf-counter.c',
'sources/sp-perf-counter.h',
'sources/sp-perf-source.c',
'sources/sp-proc-source.c',
'sources/sp-source.c',
'symbols/sp-elf-symbol-resolver.c',
'symbols/sp-jitmap-symbol-resolver.c',
'symbols/sp-kernel-symbol-resolver.c',
'symbols/sp-kernel-symbol.c',
'symbols/sp-symbol-dirs.c',
'symbols/sp-symbol-resolver.c',
'util/binfile.c',
'util/binfile.h',
'util/demangle.cpp',
'util/demangle.h',
'util/elfparser.c',
'util/elfparser.h',
'util/sp-line-reader.c',
'util/sp-line-reader.h',
'util/sp-map-lookaside.c',
'util/sp-platform.c',
'util/sp-platform.h',
'util/sp-selection.c',
'util/stackstash.c',
'util/stackstash.h',
]
libsysprof_ui_headers = ['sysprof-ui.h']
libsysprof_ui_sources = []
subdir('callgraph')
subdir('capture')
subdir('profiler')
subdir('sources')
subdir('symbols')
subdir('util')
subdir('visualizers')
subdir('widgets')
cxx = meson.get_compiler('cpp')
libsysprof_deps = [
@ -131,58 +85,6 @@ if get_option('enable_gtk')
# and manipulating the various profiler API in libsysprof. This is
# meant to be used by IDEs and the sysprof gui.
libsysprof_ui_headers = [
'callgraph/sp-callgraph-view.h',
'util/sp-model-filter.h',
'util/sp-process-model-item.h',
'util/sp-process-model.h',
'util/sp-zoom-manager.h',
'visualizers/sp-cpu-visualizer-row.h',
'visualizers/sp-line-visualizer-row.h',
'visualizers/sp-visualizer-row.h',
'visualizers/sp-visualizer-view.h',
'widgets/sp-cell-renderer-percent.h',
'widgets/sp-empty-state-view.h',
'widgets/sp-failed-state-view.h',
'widgets/sp-multi-paned.h',
'widgets/sp-process-model-row.h',
'widgets/sp-profiler-menu-button.h',
'widgets/sp-recording-state-view.h',
'sysprof-ui.h',
]
libsysprof_ui_sources = [
'callgraph/sp-callgraph-view.c',
'util/pointcache.c',
'util/pointcache.h',
'util/sp-color-cycle.c',
'util/sp-color-cycle.h',
'util/sp-model-filter.c',
'util/sp-process-model-item.c',
'util/sp-process-model.c',
'util/sp-theme-manager.c',
'util/sp-theme-manager.h',
'util/sp-zoom-manager.c',
'util/stackstash.c',
'util/stackstash.h',
'visualizers/sp-cpu-visualizer-row.c',
'visualizers/sp-line-visualizer-row.c',
'visualizers/sp-visualizer-list.c',
'visualizers/sp-visualizer-list.h',
'visualizers/sp-visualizer-row-private.h',
'visualizers/sp-visualizer-row.c',
'visualizers/sp-visualizer-ticks.c',
'visualizers/sp-visualizer-ticks.h',
'visualizers/sp-visualizer-view.c',
'widgets/sp-cell-renderer-percent.c',
'widgets/sp-empty-state-view.c',
'widgets/sp-failed-state-view.c',
'widgets/sp-multi-paned.c',
'widgets/sp-process-model-row.c',
'widgets/sp-profiler-menu-button.c',
'widgets/sp-recording-state-view.c',
]
libsysprof_ui_resources = gnome.compile_resources(
'sp-ui-resources', 'resources/libsysprof.gresource.xml',
source_dir: 'resources',

11
lib/profiler/meson.build Normal file
View File

@ -0,0 +1,11 @@
libsysprof_headers += files([
'sp-local-profiler.h',
'sp-profile.h',
'sp-profiler.h',
])
libsysprof_sources += files([
'sp-local-profiler.c',
'sp-profile.c',
'sp-profiler.c',
])

17
lib/sources/meson.build Normal file
View File

@ -0,0 +1,17 @@
libsysprof_headers += files([
'sp-gjs-source.h',
'sp-hostinfo-source.h',
'sp-perf-source.h',
'sp-proc-source.h',
'sp-source.h',
])
libsysprof_sources += files([
'sp-gjs-source.c',
'sp-hostinfo-source.c',
'sp-perf-counter.c',
'sp-perf-counter.h',
'sp-perf-source.c',
'sp-proc-source.c',
'sp-source.c',
])

17
lib/symbols/meson.build Normal file
View File

@ -0,0 +1,17 @@
libsysprof_headers += files([
'sp-elf-symbol-resolver.h',
'sp-jitmap-symbol-resolver.h',
'sp-kernel-symbol-resolver.h',
'sp-kernel-symbol.h',
'sp-symbol-dirs.h',
'sp-symbol-resolver.h',
])
libsysprof_sources += files([
'sp-elf-symbol-resolver.c',
'sp-jitmap-symbol-resolver.c',
'sp-kernel-symbol-resolver.c',
'sp-kernel-symbol.c',
'sp-symbol-dirs.c',
'sp-symbol-resolver.c',
])

43
lib/util/meson.build Normal file
View File

@ -0,0 +1,43 @@
libsysprof_headers += files([
'sp-map-lookaside.h',
'sp-selection.h',
])
libsysprof_sources += files([
'binfile.c',
'binfile.h',
'demangle.cpp',
'demangle.h',
'elfparser.c',
'elfparser.h',
'sp-line-reader.c',
'sp-line-reader.h',
'sp-map-lookaside.c',
'sp-platform.c',
'sp-platform.h',
'sp-selection.c',
'stackstash.c',
'stackstash.h',
])
libsysprof_ui_headers += files([
'sp-model-filter.h',
'sp-process-model-item.h',
'sp-process-model.h',
'sp-zoom-manager.h',
])
libsysprof_ui_sources += files([
'pointcache.c',
'pointcache.h',
'sp-color-cycle.c',
'sp-color-cycle.h',
'sp-model-filter.c',
'sp-process-model-item.c',
'sp-process-model.c',
'sp-theme-manager.c',
'sp-theme-manager.h',
'sp-zoom-manager.c',
'stackstash.c',
'stackstash.h',
])

View File

@ -0,0 +1,18 @@
libsysprof_ui_headers += files([
'sp-cpu-visualizer-row.h',
'sp-line-visualizer-row.h',
'sp-visualizer-row.h',
'sp-visualizer-view.h',
])
libsysprof_ui_sources += files([
'sp-cpu-visualizer-row.c',
'sp-line-visualizer-row.c',
'sp-visualizer-list.c',
'sp-visualizer-list.h',
'sp-visualizer-row-private.h',
'sp-visualizer-row.c',
'sp-visualizer-ticks.c',
'sp-visualizer-ticks.h',
'sp-visualizer-view.c',
])

19
lib/widgets/meson.build Normal file
View File

@ -0,0 +1,19 @@
libsysprof_ui_headers += files([
'sp-cell-renderer-percent.h',
'sp-empty-state-view.h',
'sp-failed-state-view.h',
'sp-multi-paned.h',
'sp-process-model-row.h',
'sp-profiler-menu-button.h',
'sp-recording-state-view.h',
])
libsysprof_ui_sources += files([
'sp-cell-renderer-percent.c',
'sp-empty-state-view.c',
'sp-failed-state-view.c',
'sp-multi-paned.c',
'sp-process-model-row.c',
'sp-profiler-menu-button.c',
'sp-recording-state-view.c',
])