we dab on meson
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[linuxsmartie]
|
||||
additional_packages="build-essential meson libusb-1.0-0-dev pkgconf zlib1g-dev"
|
||||
additional_packages="build-essential libusb-1.0-0-dev pkgconf zlib1g-dev"
|
||||
image=quay.io/toolbx-images/debian-toolbox:13
|
||||
init=false
|
||||
replace=true
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp linuxSmartie.service ~/.config/systemd/user/linuxSmartie.service
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable linuxSmartie
|
||||
systemctl --user start linuxSmartie
|
||||
56
meson.build
56
meson.build
@@ -1,56 +0,0 @@
|
||||
project(
|
||||
'linuxSmartie',
|
||||
'c',
|
||||
version: '1.0',
|
||||
default_options : [
|
||||
'prefix=/home/drath/.local',
|
||||
'c_std=c23',
|
||||
'warning_level=everything', # -> -Wall -Wextra -Wpedantic, also try =everything
|
||||
'werror=true', # -> -Werror
|
||||
'buildtype=release', # -> -O3, no debug
|
||||
],
|
||||
)
|
||||
|
||||
srcs = [
|
||||
'src/aio.c',
|
||||
'src/cpu.c',
|
||||
'src/gpu.c',
|
||||
'src/lcd.c',
|
||||
'src/log.c',
|
||||
'src/main.c',
|
||||
'src/sys.c',
|
||||
'src/utils.c'
|
||||
]
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
git = find_program('git')
|
||||
git_hash = run_command(git, 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
|
||||
git_commits = run_command(git, 'rev-list', '--count', 'HEAD', check: false).stdout().strip()
|
||||
|
||||
version_h = vcs_tag(
|
||||
input : 'include/version.h.in',
|
||||
output : 'version.h',
|
||||
command : ['git', 'describe', '--always', '--long', '--dirty'],
|
||||
replace_string : '@VCS_TAG@',
|
||||
fallback : 'unknown',
|
||||
)
|
||||
|
||||
executable(
|
||||
'linuxSmartie',
|
||||
srcs + [version_h],
|
||||
include_directories : include_directories('include'),
|
||||
dependencies : [
|
||||
dependency('libusb-1.0', required : true),
|
||||
cc.find_library('m', required : true),
|
||||
],
|
||||
c_args : [
|
||||
'-D_GNU_SOURCE',
|
||||
'-D_POSIX_C_SOURCE=200809L',
|
||||
'-Wno-c++-compat', # dont care about c++
|
||||
'-Wno-format-truncation', # hates pretty_bytes/pretty_num
|
||||
'-Wno-cast-align', # casting char array to gpu_metrics
|
||||
'-Wno-padded', # mostly for gpu_metrics.h
|
||||
],
|
||||
install : true,
|
||||
)
|
||||
Reference in New Issue
Block a user