summaryrefslogtreecommitdiffstats
path: root/game/build/tools/sizeprint.pl
blob: 76ba65a91dc69d77a98251dfce7e5f67e07d8125 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/perl

(my $file, my $ext) = split(/\./, @ARGV[0]);

my @stats = stat(@ARGV[0]);

my $size = @stats[7];

$file = uc( $file );

printf "static const unsigned int ${file}_SIZE = $size;\n\n";
printf "static const char* ${file}_NAME = \"@ARGV[1]\";\n\n";