#!/usr/bin/perl -w

use strict;

print "// Autogenerated file.  DO NOT EDIT!\n";
print "// Edit the grfmerge sources or grfmrgc.pl instead.\n\n";
print qq{#include "typesize.h"\n#include "grfmrg.h"\n\n};
print "const char grfmrg[] =";

open IN, "objs/grfmrgc.bin";
binmode IN;

local $/ = \30;

while(<IN>){
	s/(.)/sprintf '\x%02x',ord $1/ges;
	print qq{\n"$_"};
}

print ";\nconst U32 grfmrgsize = sizeof(grfmrg)-1;\n";
