mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
![Gerd Hoffmann](/assets/img/avatar_default.png)
perl script to transform shader programs into c include files with static string constands containing the shader programs, so we can easily embed them into qemu. Also some Makefile logic for them. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
17 lines
306 B
Perl
17 lines
306 B
Perl
#!/usr/bin/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;
|