srcdir = File.expand_path("../",__FILE__) outfile = "rinderon.so" File.open("Makefile", "w") << <<"__Makefile_END__" all: gcc -shared -o #{outfile} #{srcdir}/rinderon.c -lgdi32 install: #{outfile} __Makefile_END__