Skip to content

Commit

Permalink
meson.build: added to repository
Browse files Browse the repository at this point in the history
Playing around with the Meson/Ninja setup. Seems pretty good so far.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
  • Loading branch information
tycho committed Feb 20, 2018
1 parent 5bf41cf commit 04222b8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions meson.build
@@ -0,0 +1,23 @@
project('cpuid', 'c')

compiler = meson.get_compiler('c')


gen_build_h = custom_target('build.h',
input : [],
output : ['build.h'],
command : [meson.current_source_dir() + '/tools/build.pl', '@OUTPUT@'])

gen_license_h = custom_target('license.h',
input : ['COPYING'],
output : ['license.h'],
command : [meson.current_source_dir() + '/tools/license.pl', '@INPUT@', '@OUTPUT@'])

src = ['cache.c', 'clock.c', 'cpuid.c', 'feature.c', 'handlers.c', 'main.c', 'sanity.c', 'threads.c', 'util.c', 'version.c']

incdirs = include_directories('.')
lm = compiler.find_library('m')
threads = dependency('threads')
executable('cpuid', src, gen_build_h, gen_license_h, include_directories : incdirs, link_args : '-pthread', dependencies : [lm, threads])

# vim: set ts=4 sts=4 sw=4 et:

0 comments on commit 04222b8

Please sign in to comment.