xserver-multidpi/hw/xwin/glx/Makefile.am
Keith Packard fd4d9c75c2 hw/xwin: Look for gl spec files in $(srcdir) or .
Tarballs include the downloaded gl spec files, which will end up in
$(srcdir). But, git-based builds will not have them at all and will
need to download them from opengl.org. They'll land in in the build
directory instead of $(srcdir), and so we need to allow them to be in
either place.

This change checks for the files in $(srcdir), linking them to . if
present. Otherwise, it downloads them from opengl.org.

A suggested better solution is to have Mesa install these files somewhere.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Kristian Høgsberg <krh@bitplanet.net>
2011-02-25 20:27:03 -08:00

61 lines
1.7 KiB
Makefile

noinst_LTLIBRARIES = libXwinGLX.la
libXwinGLX_la_SOURCES = \
winpriv.c \
winpriv.h \
glwindows.h \
glwrap.c \
indirect.c \
wgl_ext_api.c
if XWIN_MULTIWINDOW
DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW
endif
if XWIN_MULTIWINDOWEXTWM
DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM
endif
DEFS = $(DEFS_MULTIWINDOW) $(DEFS_MULTIWINDOWEXTWM)
INCLUDES = -I$(top_srcdir)/miext/rootless
AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
$(XWINMODULES_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/hw/xwin/
glwrap.c: generated_gl_wrappers.c
wgl_ext_api.c: generated_wgl_wrappers.c wglext.h
wgl_ext_api.h: wglext.h
indirect.c: wgl_ext_api.h
SPEC_FILES = gl.spec gl.tm wglext.spec wgl.tm
gl.spec:
wget http://www.opengl.org/registry/api/gl.spec
gl.tm:
wget http://www.opengl.org/registry/api/gl.tm
wglext.spec:
wget http://www.opengl.org/registry/api/wglext.spec
wgl.tm:
wget http://www.opengl.org/registry/api/wgl.tm
generated_gl_wrappers.c: gen_gl_wrappers.py gl.spec gl.tm
$(srcdir)/gen_gl_wrappers.py --spec=`test -e gl.spec || echo $(srcdir)/`gl.spec --typemap=`test -e gl.tm || echo $(srcdir)/`gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c
generated_wgl_wrappers.c: gen_gl_wrappers.py wglext.spec wgl.tm
$(srcdir)/gen_gl_wrappers.py --spec=`test -e wglext.spec || echo $(srcdir)/`wglext.spec --typemap=`test -e wgl.tm || echo $(srcdir)/`wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c
wglext.h:
wget http://www.opengl.org/registry/api/wglext.h
BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c
CLEANFILES = $(BUILT_SOURCES)
DISTCLEANFILES = $(SPEC_FILES) wglext.h
EXTRA_DIST = gen_gl_wrappers.py $(SPEC_FILES) wglext.h