shithub: sl

Download patch

ref: 39887219c3ec14f8316cb4d3e259c3c4bfade700
parent: b655177494fc131a3c3e07d9b17a285785e94356
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Jan 26 23:36:24 EST 2025

meson: rearrange

--- a/meson.build
+++ b/meson.build
@@ -39,6 +39,35 @@
 	language: 'c',
 )
 
+src_flisp = [
+	'3rd/fn.c',
+	'3rd/mt19937-64.c',
+	'3rd/spooky.c',
+	'3rd/tbl.c',
+	'bitvector.c',
+	'builtins.c',
+	'compress.c',
+	'cvalues.c',
+	'equal.c',
+	'equalhash.c',
+	'flisp.c',
+	'flmain.c',
+	'hashing.c',
+	'htable.c',
+	'ios.c',
+	'iostream.c',
+	'opcodes.c',
+	'operators.c',
+	'print.c',
+	'ptrhash.c',
+	'random.c',
+	'read.c',
+	'string.c',
+	'table.c',
+	'types.c',
+	'utf8.c',
+]
+
 cc = meson.get_compiler('c')
 
 if cc.get_id() == 'clang'
@@ -67,8 +96,10 @@
 inc = [include_directories('3rd', '3rd/mp', '3rd/utf', '3rd/brieflz')]
 extras = []
 
-if host_machine.system() == 'macos'
-	platform = 'macos'
+sys = host_machine.system()
+
+if sys == 'macos'
+	platform = sys
 	flisp_exe_name = 'flisp.code.bin'
 	add_languages(
 		'cpp',
@@ -92,10 +123,11 @@
 		cpp.find_library('RetroConsole', required: true),
 		cpp.find_library('retrocrt', required: true),
 	]
-elif host_machine.system() == 'dos'
+elif sys == 'dos'
+	platform = sys
 	flisp_exe_name = 'flisp.exe'
-	platform = 'dos'
 	inc += [include_directories('dos')]
+	src_flisp += ['3rd/wcwidth.c']
 else
 	platform = 'posix'
 	flisp_exe_name = 'flisp'
@@ -103,6 +135,7 @@
 endif
 
 inc += [include_directories(platform)]
+src_flisp += ['sys_' + platform + '.c']
 
 common = static_library(
 	'common',
@@ -111,40 +144,6 @@
 	pic: false,
 	prelink: false,
 )
-
-src_flisp = [
-	'3rd/fn.c',
-	'3rd/mt19937-64.c',
-	'3rd/spooky.c',
-	'3rd/tbl.c',
-	'bitvector.c',
-	'builtins.c',
-	'compress.c',
-	'cvalues.c',
-	'equal.c',
-	'equalhash.c',
-	'flisp.c',
-	'flmain.c',
-	'hashing.c',
-	'htable.c',
-	'ios.c',
-	'iostream.c',
-	'opcodes.c',
-	'operators.c',
-	'print.c',
-	'ptrhash.c',
-	'random.c',
-	'read.c',
-	'string.c',
-	'sys_' + platform + '.c',
-	'table.c',
-	'types.c',
-	'utf8.c',
-]
-
-if host_machine.system() == 'dos'
-	src_flisp += ['3rd/wcwidth.c']
-endif
 
 math = cc.find_library('m', required: false)