srcdir = File.expand_path("../",__FILE__)
outfile = "rinderon.so"

File.open("Makefile", "w") << <<"__Makefile_END__"
SRCS = \
  #{srcdir}/window.c \
  #{srcdir}/directx9.c \
  #{srcdir}/directx9_utils.c

LIBS = \
  -lgdi32 \
  -ld3d9

all:
	g++ -shared -o #{outfile} ${SRCS} ${LIBS}

install: #{outfile}
__Makefile_END__
