put /local/pcb/mod {lib_hid_gl}
put /local/pcb/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/pcb/mod/OBJS_C99 [@
  $(LIBRND_PLUGDIR)/lib_hid_gl/draw_vao.o
@]
end

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

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

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

switch /local/pcb/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
