historical/m0-applesillicon.git/xnu-qemu-arm64-5.1.0/scripts/shaderinclude.pl

17 lines
310 B
Perl
Raw Normal View History

2024-01-16 17:20:27 +00:00
#!/usr/bin/env perl
use strict;
use warnings;
my $file = shift;
open FILE, "<", $file or die "open $file: $!";
my $name = $file;
$name =~ s|.*/||;
$name =~ s/[-.]/_/g;
print "static GLchar ${name}_src[] =\n";
while (<FILE>) {
chomp;
printf " \"%s\\n\"\n", $_;
}
print " \"\\n\";\n";
close FILE;