mirror of
https://github.com/mid-kid/metroskrew.git
synced 2025-06-18 13:15:40 -04:00
Set up config.h for wrap
This commit is contained in:
parent
362012944e
commit
d71030c7c3
@ -7,4 +7,4 @@ custom_target(
|
||||
output: 'sdk',
|
||||
command: ['sdk.sh', '@OUTPUT@', args],
|
||||
install: true,
|
||||
install_dir: get_option('datadir') / 'metroskrew')
|
||||
install_dir: proj_datadir)
|
||||
|
16
meson.build
16
meson.build
@ -1,6 +1,13 @@
|
||||
project('metroskrew', 'c',
|
||||
default_options: ['warning_level=2'])
|
||||
|
||||
wine_headers = subproject('wine').get_variable('headers_dep_lean')
|
||||
bins_sub = subproject('mw-executables')
|
||||
bins_dir = bins_sub.get_variable('bins_dir')
|
||||
bins = bins_sub.get_variable('bins')
|
||||
bins_paths = bins_sub.get_variable('bins_paths')
|
||||
bins_paths_all = bins_sub.get_variable('bins_paths_all')
|
||||
|
||||
c = meson.get_compiler('c')
|
||||
|
||||
as = find_program('as')
|
||||
@ -14,13 +21,6 @@ as_gen = generator(as,
|
||||
output: '@PLAINNAME@.o',
|
||||
depfile: '@PLAINNAME@.o.d')
|
||||
|
||||
wine_headers = subproject('wine').get_variable('headers_dep_lean')
|
||||
bins_sub = subproject('mw-executables')
|
||||
bins_dir = bins_sub.get_variable('bins_dir')
|
||||
bins = bins_sub.get_variable('bins')
|
||||
bins_paths = bins_sub.get_variable('bins_paths')
|
||||
bins_paths_all = bins_sub.get_variable('bins_paths_all')
|
||||
|
||||
assert(host_machine.cpu_family() == 'x86',
|
||||
'This project can only be built for 32-bit x86')
|
||||
arch = '-march=i586'
|
||||
@ -43,6 +43,8 @@ link_args_base = [
|
||||
'-no-pie'
|
||||
]
|
||||
|
||||
proj_datadir = get_option('datadir') / meson.project_name()
|
||||
|
||||
subdir('dlls')
|
||||
subdir('patch')
|
||||
subdir('relink')
|
||||
|
@ -1,3 +1,5 @@
|
||||
fs = import('fs')
|
||||
|
||||
c_args = [
|
||||
c_args_base
|
||||
]
|
||||
@ -20,7 +22,16 @@ if host_machine.system() == 'windows'
|
||||
]
|
||||
endif
|
||||
|
||||
executable('skrewrap', 'wrap.c',
|
||||
wrap_name = 'skrewrap'
|
||||
|
||||
cfg = configuration_data()
|
||||
cfg.set_quoted('PROGRAM_NAME', wrap_name)
|
||||
cfg.set_quoted('BIN_TO_DATADIR',
|
||||
fs.relative_to(proj_datadir, get_option('bindir')))
|
||||
|
||||
cfg_file = configure_file(output: 'config.h', configuration: cfg)
|
||||
|
||||
executable(wrap_name, 'wrap.c', cfg_file,
|
||||
c_args: c_args,
|
||||
link_args: link_args,
|
||||
install: true)
|
||||
|
@ -15,7 +15,7 @@ extern char **environ;
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#define PROGRAM_NAME "skrewrap"
|
||||
#include "config.h"
|
||||
|
||||
#define DEFAULT_MWCCARM "4.0-1051"
|
||||
#define DEFAULT_MWLDARM "2.0-99"
|
||||
|
Loading…
Reference in New Issue
Block a user