This commit is contained in:
IoIxD
2026-01-09 14:43:44 -07:00
parent 079cfa18b9
commit 2d3bd9213e
13 changed files with 402 additions and 69 deletions

8
pl/ostype/Darwin.pl Normal file
View File

@@ -0,0 +1,8 @@
$library_suffix = ".dylib";
set_shared_flag("-dynamiclib");
use_backend("appkit");
add_cflags("-DSTBI_NO_THREAD_LOCALS");
1;

View File

@@ -1,4 +1,4 @@
if (param_get("experimental-wayland")) {
IF (param_get("experimental-wayland")) {
use_backend("wayland", "x11");
}
else {

View File

@@ -46,6 +46,13 @@ if (grep(/^wayland$/, @backends)) {
$gl_libs = "-lGL -lGLU";
}
if (grep(/^appkit$/, @backends)) {
add_cflags("-DUSE_APPKIT");
new_object("src/backend/appkit.m");
$gl_libs = "-lGL -lGLU";
}
if (param_get("stb-image")) {
add_cflags("-DUSE_STB_IMAGE");
}

View File

@@ -40,10 +40,14 @@ sub new_example {
push(@examples_targets, "${_[0]}${executable_suffix}");
}
sub set_shared_flag {
@shared = $_[0];
}
sub new_object {
my @l = glob($_[0]);
foreach my $e (@l) {
$e =~ s/\.c$/$object_suffix/;
$e =~ s/\.(c|m)$/$object_suffix/;
push(@library_targets, $e);
}
}