Skip to content
Snippets Groups Projects
meson.build 1.32 KiB
Newer Older
Bruce Cowan's avatar
Bruce Cowan committed
project('stdlib', 'c')
Bruce Cowan's avatar
Bruce Cowan committed

cc = meson.get_compiler('c')
Bruce Cowan's avatar
Bruce Cowan committed
libm = cc.find_library('m')
Bruce Cowan's avatar
Bruce Cowan committed

Bruce Cowan's avatar
Bruce Cowan committed
glib_dep = dependency('glib-2.0', version: '>= 2.16', required: false)
openmp_dep = dependency('openmp', required: false)
thread_dep = dependency('threads', required: false)
if host_machine.system() == 'windows'
    cc = meson.get_compiler('c')
	socket_deps = [cc.find_library('ws2_32')]
else
    socket_deps = []
endif

subdir('lib')
Bruce Cowan's avatar
Bruce Cowan committed

executable('add', 'add.c')
executable('add2', 'add2.c', link_with: lib_utils, include_directories: 'lib')
Bruce Cowan's avatar
Bruce Cowan committed
executable('angle', 'angle.c', dependencies: libm)
executable('binary', 'binary.c')
executable('complex', 'complex.c', dependencies: libm)
executable('einstein', 'einstein.c')
executable('fib', 'fib.c')
executable('fixed-sizeof', 'fixed-sizeof.c')
executable('fgets', 'fgets.c')
executable('gcd', 'gcd.c')
executable('getchar', 'getchar.c')
Bruce Cowan's avatar
Bruce Cowan committed
executable('kepler', 'kepler.c', dependencies: libm)
executable('next', 'next.c', dependencies: libm)
executable('parrot', 'parrot.c')
executable('sizeof', 'sizeof.c')
executable('snprintf', 'snprintf.c')
executable('strtol', 'strtol.c')
executable('taylor', 'taylor.c')
executable('world', 'world.c')

subdir('array')
subdir('hashtable')
subdir('list')
subdir('sockets')
Bruce Cowan's avatar
Bruce Cowan committed
subdir('winter')
Bruce Cowan's avatar
Bruce Cowan committed

if openmp_dep.found()
    subdir('openmp')
endif

if thread_dep.found()
    subdir('pthread')
endif