put /local/rnd/mod {lib_hid_gl}
put /local/rnd/mod/OBJS_C99 [@
  $(LIBRND_PLUGDIR)/lib_hid_gl/hidgl.o
  $(LIBRND_PLUGDIR)/lib_hid_gl/lib_hid_gl.o
  $(LIBRND_PLUGDIR)/lib_hid_gl/stencil_gl.o
  $(LIBRND_PLUGDIR)/lib_hid_gl/draw_direct.o
  $(LIBRND_PLUGDIR)/lib_hid_gl/draw_error.o
  $(LIBRND_PLUGDIR)/lib_hid_gl/stenc_direct.o
  $(LIBRND_PLUGDIR)/lib_hid_gl/stenc_error.o
@]

if ?libs/gui/gl/vao/presents
then
append /local/rnd/mod/OBJS_C99 [@
  $(LIBRND_PLUGDIR)/lib_hid_gl/draw_vao.o
@]
end

if ?libs/gui/gl/fb_attachment/presents
then
append /local/rnd/mod/OBJS_C99 [@
  $(LIBRND_PLUGDIR)/lib_hid_gl/stenc_framebuffer.o
@]
end

append /local/rnd/mod/DISTCLEANFILES { $(PLUGDIR)/lib_hid_gl/opengl.h }
put /local/rnd/mod/CONF {$(LIBRND_PLUGDIR)/lib_hid_gl/lib_hid_gl_conf.h}
put /local/rnd/mod/CONFFILE {lib_hid_gl.conf}
put /local/rnd/mod/CONFVAR {lib_hid_gl_conf_internal}

switch /local/module/lib_hid_gl/controls
	case {disable} end;
	default
		put /local/rnd/mod/CFLAGS   [@@/target/libs/gui/gl/cflags@ @/target/libs/gui/glu/cflags@@]
		put /local/rnd/mod/LDFLAGS  [@@/target/libs/gui/gl/ldflags@ @/target/libs/gui/glu/ldflags@@]
	end
end

switch /local/module/lib_hid_gl/controls
	case {buildin}   include /local/librnd/tmpasm/buildin; end;
	case {plugin}    include /local/librnd/tmpasm/plugin; end;
	case {disable}   include /local/librnd/tmpasm/disable; end;
end
